If I have an existing WCF SOAP service which has an operation like this:
[OperationContract]
List<string> GetDetails(int id, string name);
Under the hood, WCF generates a GetDetails_InputMessage
type to represent the parameters of the method.
Is there some way to change the service method implementation to explicitly use this type, without breaking any existing clients?
[OperationContract]
List<string> GetDetails(GetDetails_InputMessage parameters);
// with some extra magic?
(Or more precisely, to declare my own transport type that would end up generating exactly the same WSDL and behaviour so that existing clients can't tell the two apart.)
I assume that the extra magic will probably involve MessageContract
but I haven't been able to find any references on switching an existing operation from one to the other without breaking anything.
(For further reference: I have an existing SOAP service to which I've added a webHttp binding, but noticed that the help pages are really bad at reporting WrappedRequest
body, which is needed when there's more than one parameter that needs to be sent via the body. So I want to switch these to Bare
body with an explicitly-specified wrapper type (since it does appear to be able to render those ok), but in such a way that it doesn't break existing SOAP clients as well. I would also accept an alternative answer to this question that is not "use IIS".)