The methods method1 and method2 use the same SOAPAction
I'm implementing a webservice based on a wsdl that is provided by another company. I need to implement a webservice-stub for testing purposes. So I used wsdl.exe to generate the client and serverside interfaces and implemented them. When I do a webservice call I get an exception saying The methods method1 and method2 use the same SOAPAction ''. Looking at the wsdl shows that the two methods do not provide a soapaction
<operation name="method1">开发者_开发百科
<soap:operation soapAction=""/>
...
</operation>
<operation name="method2">
<soap:operation soapAction=""/>
...
</operation>
The exception is thrown when I connect the client to the Webservice-stub not when I connect to the real webservice.
Is there a way to configure / implement the webservice-stub to ignore the soapAction-Header?
Try setting the RoutingStyle property of the SoapDocumentServiceAttribute to SoapServiceRoutingStyle.RequestElement.
[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement, ...)]
public class ServiceNameHere : System.Web.Services.WebService
{
...
}
精彩评论