开发者

Dealing with SOAP Request with No SoapAction in Header

I have a heck of a problem. I have a .NET SOAP web service that is being called by an Axis client.

The problem is there is not SOAP Action in the header information, and IIS is just throwing a 500 error. I am being told by the client to disable header validation, but I am not sure how to do this in .NET. The only thing I can think of is to write a method to capture and parse the request manually, which seems painful. Any help would be appreciated.

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelo开发者_Python百科pe/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
...
</soapenv:Body>
POST /Services/MyService.asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2.1
Host: 1.2.3.4:55
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 1465


Solved it by myself. Needed to add:

[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]

To the service definition.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜