I have an existing SOAP method which has a huge number of parameters, e.g.
[OperationContract]
public ResultObject DoSomeAction(string a, string b, DateTime c, OtherEnum d,
string e, string f, ....)
Which results in
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<DoSomeAction>
<xs:element minOccurs="0" maxOccurs="1" name="a" type="xs:string"/>
...
</DoSomeAction>
</soapenv:Body>
</soapenv:Envelope>
Ideally I'd like to factor out these into an object without changing the SOAP WSDL, so that the code could look more like
[OperationContract]
public ResultObject DoSomeAction(RequestObject request)
[DataContract]
public class RequestObject
{
[DataMember]
public string a { get; set; }
...
}
However I can't seem to find the correct way to add an attribute to serialize only the properties of Request Object and not the object itself.
Are there any way to define the Request Object that that the resulting SOAP will end up the same?