1

Possible Duplicate:
Is there a way to get the raw SOAP request from within a ASP.NET WebMethod?

I have an ASP/VB.NET webservice.

Some external application is trying to call my webservice.

As soon as my webservice function starts, I would like to get the XML request that was done to call my service / function.

I can't install other applications (such as Fiddler) to monitor the web service... so I need to be able to capture the request through code.

Any help is appreciated. Thanks!

Community
  • 1
  • 1
adam
  • 2,930
  • 7
  • 54
  • 89

1 Answers1

1

I found the answer on MSDN http://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapextension(VS.80).aspx

Adding the class from the above link, then adding the TraceExtension() _ shown in the code below, now logs both XML soap request and response:

<WebMethod()> _
<TraceExtension()> _
Public Function GetResults() as string
 return "True"
End Function
adam
  • 2,930
  • 7
  • 54
  • 89