简体   繁体   English

从 WSDL (.NET) 生成 SOAP 请求

[英]Generate SOAP Request from WSDL (.NET)

I'm looking for a way to generate a SOAP Envelop for a specific web method from a WSDL proxy class using .NET framework (c#)我正在寻找一种使用 .NET 框架 (c#) 从 WSDL 代理类为特定 Web 方法生成 SOAP 信封的方法

I looked over the internet and did not see responses to this exact request.我查看了互联网,没有看到对这个确切请求的回应。 I know i can call the proxy directly but i need to get the SOAP message itself.我知道我可以直接调用代理,但我需要获取 SOAP 消息本身。

Any help would be greatly appreciated任何帮助将不胜感激

Thanks谢谢

Do you want the SOAP message so you can add certain fields to the SOAP header?您是否需要 SOAP 消息以便将某些字段添加到 SOAP 标头? You can decorate your classes with MessageContractAttribute and then specify which fields go in the SOAP header vs the body您可以使用 MessageContractAttribute 装饰您的类,然后指定 SOAP 标头与正文中的哪些字段

See http://msdn.microsoft.com/en-us/library/ms730255%28v=vs.100%29.aspx请参阅http://msdn.microsoft.com/en-us/library/ms730255%28v=vs.100%29.aspx

for details详情

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

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