Friday, 12 February 2010

Capturing XML Request and Response with .NET Soap Extensions

Capturing XML Request and Response with .NET Soap Extensions is possible... its certainly useful when a call is made to a web service within a .net language and you need visibility of your serialized xml request/response. It's very useful for debugging too!

The key here is to use Soap Extensions.

1. Create a class with extends System.Web.Services.Protocols.SoapExtension.
2. override void ProcessMessage() and capture the xml

Here is a link with the code and setup guides...
http://www.blog.encoresystems.net/articles/how-to-capture-soap-envelopes-when-consuming-a-web-service.aspx

No comments: