What is a simple way to get the raw SOAP Request/Envelope that I am sending to a web service

C

Chris Hayes

Greetings,

I've looked around for an answer to this, but one is not jumping out at me
so I'll just ask people who have probably run across this already...

What is a simple way to get the raw SOAP Request/Envelope that I am sending
to a ASP.NET web service when I have the ASP.NET Web Service set as a Web
Reference in my project. Ideally I would always be working with a .NET
Consumer of a Web Service, but just in case I need to know the raw XML for
utilization in a non-.NET consumer.

Thanks,

Chris
 
M

Marc Landrum

Chris,

I believe you can access the raw SOAP by writing your own class that
inherits the SOAPExtension class. By overriding the ProcessMessage method,
you can access the SoapMessage at each stage any stage of
serialization/deserilization. Since you want the raw SOAP message recevied
by your Web service, you should gear your extension to do its work at
SoapMessageStage.BeforeDeserialize.

You can check the MSDN entry for SOAPExtension for a VB.NET and C# example
of a SOAPExtension that writes the SOAP messages to a output file.

Note -- you will also need to write a SoapExtensionAttribute class so that
your webservice will have access to the SoapExtension.

Hope that helps.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top