Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to look at the actual SOAP request/response in C#

I have added a wsdl file in my project as a service reference. The application sends SOAP messages to a particular device which then sends the response in SOAP format.

Is there a way to look at the actual SOAP message that is wrapped in XML? Having to turn on wireshark to look at the SOAP messages gets tedious.

like image 771
l46kok Avatar asked May 26 '13 09:05

l46kok


People also ask

How do I check my SOAP response?

Click the 'RAW' Tab in SOAP-UI Response Window to understand how the response is sent via HTTP. After processing the request, the http response code (200) is shown which means it is a success. The web-server has processed it successfully.

How do you identify SOAP requests?

A simple rule you can use is to check the presence of a SOAPAction header. If it is present, then it can be a SOAP 1.1 message, and if not, it is a SOAP 1.2 message. The tricky thing here is that, even if the SOAPAction header is not defined in SOAP 1.2 HTTP binding, no one is restricted from sending that header.


2 Answers

You can use the SVCTraceViewer to trace what are the messages that are being sent to and fro for each service call. You just have to set up the config and WCF builds the log files with the .svclog extension.

More details on this tool and its associated configuration is here. This does not require any 3rd party tool or network inspectors to be run etc... This is out of the box from Microsoft.

like image 130
Saravanan Avatar answered Oct 29 '22 01:10

Saravanan


You are probably looking for SOAP extension, look at this post:

Get SOAP Message before sending it to the WebService in .NET

like image 45
Moka Avatar answered Oct 29 '22 00:10

Moka