在将 SOAP 消息发送到 .NET 中的 WebService 之前获取它 [英] Get SOAP Message before sending it to the WebService in .NET
问题描述
我正在调用外部 HTTPS 网络服务.
I'm calling an external HTTPS webservice.
为了检查出了什么问题,所有者需要我发送的 SOAP 请求.
In order to check what is wrong, the owner needs the SOAP request I'm sending.
我有一个 Web 参考和由 VS 2008 生成的生成代理类...
I have a web reference and the generated proxy class generated by VS 2008...
有没有办法在发送之前查看 SOAP 消息?
我正在考虑一些 .net 代码......因为我尝试的嗅探器没有看到"网络服务调用,不知道为什么.
I'm thinking in some .net code... because the Sniffers I tried didn't "see" the webservice invocation don't know why.
推荐答案
您需要的是 SoapExtension.这里有很多很好的例子:
What you need is a SoapExtension. There's quite a few good examples here:
获取 RAW Soap来自在 ASP.net 中运行的 Web 参考客户端的数据
其中一篇文章链接到:http://msdn.microsoft.com/en-us/magazine/cc164007.aspx
还搜索 SO:https://stackoverflow.com/search?q=SoapExtension
这篇关于在将 SOAP 消息发送到 .NET 中的 WebService 之前获取它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!