Hello,
I need to log the SOAP Requests sent from a web service. How can I get a SOAP Request saved in an xml file for error handling? Here's the following example:
- using System.Web.Services;
-
- namespace TestWebService
- {
- [WebService(Namespace = "http://tempuri.org/")]
- [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- [System.ComponentModel.ToolboxItem(false)]
- public class Test : System.Web.Services.WebService
- {
-
- [WebMethod]
- public string HelloWorld(int a, int b)
- {
- int c = a + b;
-
- return "The result is: "+c;
- }
- }
- }
Request (needs to be saved to file):
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
- <soapenv:Header/>
- <soapenv:Body>
- <tem:HelloWorld>
- <tem:a>5</tem:a>
- <tem:b>3</tem:b>
- </tem:HelloWorld>
- </soapenv:Body>
- </soapenv:Envelope>
Any kind of help would be appreciated, thank you!