Capturing raw XML for Web Service Calls

The Web Service call mechanism in .NET doesn't support direct capture of the XML data that is sent over the wire internally. This means you can't capture the XML via any code mechanism.

However, you can use an HTTP proxy like Fiddler (fiddlertool.com) to capture all XML messages sent to a service.

Here's what Fiddler looks like when capturing a Web Service call:

Notice the window on the left which contains a list of all the HTTP requests happening on your system and the window on the right which contains the request (top) and response (bottom) data. You can look at the request data in various different ways.

Here's how to use Fiddler:

  • Download Fiddler from fiddlertool.com
  • Start Fiddler before making your Web Service calls
  • Find the Web Service request in the tree list on the left
  • Click on the top right to and the Raw tab to see the Raw XML for the request
  • Click on the bottom right and the Raw tab to see the Raw XML for the response

You can also use the XML tabs on both request and response to see an XML tree display which makes it easier to see individual values in a large response.

Using HTTPS Requests

By default Fiddler doesn't work with HTTPS requests and you need to install a Fiddler specific certificate in order to do this. Fiddler then acts as an HTTPS proxy to your requests and in most cases CAN handle HTTPS requests.

To configure Fiddler for HTTPS set up your HTTPS options like this:

and follow the instructions in the dialog that pops up for registering the Fiddler certificate. There's more information in the Fiddler Help file that describes more what Fiddler does when installing a root certificate into your trusted certificate store.


© West Wind Technologies, 2004-2020 • Updated: 09/29/15
Comment or report problem with topic