Quote:
Save the following code with the name SqlSoapTracer.cs in the same folder that contains the SOAP client project files.
In the Solution Explorer window, perform the following steps:
Select the project by name, right-click and point to Add, and then select Add Existing Item.
In the Add Existing Item dialog box, browse and select the SqlSoapTracer.cs file from the location you saved it to in step 1.
Select Show All Files and expand the Web References node and select the Reference.cs file.
In the Code Editor window, update the Reference.cs file by locating the entry points for your Web methods there. To add SOAP trace support when the Web methods execute in client code, add the following snoopattribute() call in the Reference.cs code directly before the entry point for each Web method you want to trace, as shown in the following lines of code.
1
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:ContactService#login", RequestNamespace="urn:ContactService", ResponseNamespace="urn:ContactService")]
2
[return: System.Xml.Serialization.SoapElementAttribute("token")]
3
[snoopattribute()]
4
public string login(string user, string pass, login_options login_options) { object[] results = this.Invoke("login", new object[] { user, pass, login_options}); return ((string)(results[0])); }
This registers a SOAP extension that invokes the SOAP tracing of these Web methods when they are executed.
http://forums.asp.net/t/1827540.aspx/1[
^]