简体   繁体   English

如何从C#Web服务调用记录SOAP信封?

[英]How to log SOAP envelope from C# web service call?

Is there any way to get the SOAP envelope generated by .NET when calling a web service through a C# proxy class? 通过C#代理类调用Web服务时,是否有任何方法可以获取.NET生成的SOAP信封? I'm looking to get the SOAP envelope with all of the parameters defined in .NET, not a generic, blank SOAP envelope like SoapUI creates. 我希望获得具有.NET中定义的所有参数的SOAP信封,而不是像SoapUI创建的通用空白SOAP信封。

I usually just use fiddler to intercept the SOAP envelope. 我通常只使用提琴手来拦截SOAP信封。 You need to specify the local Fiddler proxy (default localhost:8888) on the webservice class for that to work. 您需要在webservice类上指定本地Fiddler代理(默认localhost:8888)才能正常工作。

ws.Proxy = new System.Net.WebProxy("localhost", 8888);

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

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