简体   繁体   中英

How can i get full soap request (header and xml body)

I developed a soap web service by c#.Net

but i need to get a whole soap request. because some requsts are not in .net correct form and i need to have whole XML request (header and body) to read it full.

How can i get full soap request (header and xml body)?

You can extend ASP.NET web services with a SoapExtension - this gives you low-level access to the SOAP message stream. You could use this to inspect and then transform input messages as required. Here's an old MSDN article about SOAP extensions: http://msdn.microsoft.com/en-us/magazine/cc188761.aspx

If the client can call your WebMethod successfully but you just want to inspect the original message you could try reading Request.InputStream; that would be a lot simpler than implementing a SoapExtension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM