简体   繁体   English

使用C#中的WebServices的原始SOAP数据

[英]Raw SOAP data with WebServices in C#

Where can I find the RAW/object data of a SOAP request in C# when using WebServices. 使用WebServices时,在哪里可以找到C#中SOAP请求的RAW /对象数据。

Can't find it anywhere. 在任何地方都找不到。 Shouldent it be available in the HttpContext.Current.Request object ? 它应该在HttpContext.Current.Request对象中可用吗?

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

Shouldent it be available in the HttpContext.Current.Request object ? 它应该在HttpContext.Current.Request对象中可用吗?

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 . 如果您只想查看该数据以便将其记录下来或作为调试的辅助工具,请参见SoapExtension类中的示例。 It's a working sample of an extension that can log input and output as XML. 这是扩展的工作示例,可以将输入和输出记录为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. 指发布到C#ASP.NET中的页面的RAW数据。

It sounds like you're going to have to go lower level on your implementation if you want to see the raw XML. 听起来,如果您想查看原始XML,就必须在实现上走下一层。 Check out the generic handler (ASHX extension). 签出通用处理程序 (ASHX扩展名)。 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. 它的级别很低,但是可以完全控制服务生命周期。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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