Keith Palmer Jr.
Keith Palmer Jr.

Reputation: 27952

View/log raw SOAP requests/responses using System.Web.Services.Protocols.SoapHttpClientProtocol

I have a SOAP web service in .NET which uses: System.Web.Services.Protocols.SoapHttpClientProtocol

How can I get the raw SOAP request/response XML that's getting sent over HTTP so that I can log the incoming/outgoing requests?

Note: I am not looking for an answer like "use Wireshark" or "use a HTTP sniffer". I want a way to get the raw SOAP request/response as a string within my application so that I can log it to a file.

Thanks!

Upvotes: 10

Views: 6480

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364249

You need custom SoapExtension - there is a sample which shows how to get and save a message.

Upvotes: 4

Related Questions