SOAP My Way: SoapDocumentMethodAttribute
Using attributes ASP.Net allows you to customize a lot of your SOAP messages that your web services transport. I was working on a custom web service that was really a thin wrapper around an existing web service and didn\’t want all the extra namespace declarations on my result and looked into the code of the web client proxy to see how they used attributes to control their web service output.
The SoapDocumentMethod attribute is used to specify that a web method uses Document formatting for its SOAP messages.
[ SoapDocumentMethod(Action=”http://www.contoso.com/Sample”, RequestNamespace=”http://www.contoso.com/Request”,