cra*_*her 4 .net c# soap web-services
我正在实施一个基于另一家公司提供的wsdl的web服务.我需要实现一个webservice-stub用于测试目的.所以我使用wsdl.exe来生成客户端和服务器端接口并实现它们.当我进行webservice调用时,我得到一个异常,说方法method1和method2使用相同的SOAPAction''.查看wsdl表明这两种方法不提供soapaction
<operation name="method1">
<soap:operation soapAction=""/>
...
</operation>
<operation name="method2">
<soap:operation soapAction=""/>
...
</operation>
Run Code Online (Sandbox Code Playgroud)
当我将客户端连接到Webservice-stub而不是连接到真正的Web服务时,抛出异常.
有没有办法配置/实现webservice-stub忽略soapAction-Header?
尝试设置的RoutingStyle财产SoapDocumentServiceAttribute到SoapServiceRoutingStyle.RequestElement.
[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement, ...)]
public class ServiceNameHere : System.Web.Services.WebService
{
...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2820 次 |
| 最近记录: |