Capture XML for external web service request and response

Hello,

When we invoke an external web service, we run into a number of errors. It would be very helpful to capture the raw XML for the request and the response.

I’ve installed Fiddler on the development server hoping to see the raw XML captured there. However, i didn’t, to my surprise, even though a successful request and response occurred.

Any thoughts on how I can capture the raw XML?

Thanks.

Trying to get XML through Fiddler depends on two assumptions:

  1. That the messages are serialized to XML (instead of using binary serialization, for example).
  2. That the communication uses HTTP protocol. If you talk to the service via TCP, for example, an HTTP proxy such as Fiddler won’t help you.

I suggest you use tracing - you can find an example in WCF documentation: Configuring Message Logging.