简体   繁体   中英

Raw SOAP data with WebServices in C#

Where can I find the RAW/object data of a SOAP request in C# when using WebServices.

Can't find it anywhere. Shouldent it be available in the HttpContext.Current.Request object ?

如果您只是想调试Web服务,则可以安装Fiddler ,它允许您检查与Web服务之间来回的数据。

Shouldent it be available in the HttpContext.Current.Request object ?

No, it shouldn't.

What are you trying to accomplish? If you just want to see that data so you can log it, or as an aid to debugging, then see the example in the SoapExtension class . It's a working sample of an extension that can log input and output as XML. I've used a modified version of it myself.

I found

Request.Params[null]

refers to the RAW data posted to the page in C# ASP.NET.

It sounds like you're going to have to go lower level on your implementation if you want to see the raw XML. Check out the generic handler (ASHX extension). This will allow you to deal with the request/response streams directly. It's very low level, but gives you full control over the service lifecycle.

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