我有这个C#网络服务定义
POST /MyServices/WP.asmx HTTP/1.1
Host: example.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://example.net/Authorisation"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Authorisation xmlns="https://example.net/">
<PMSRequest>string</PMSRequest>
</Authorisation>
</soap:Body>
</soap:Envelope>
具有字符串参数并返回JSON字符串,当我尝试通过浏览器访问它时:
https://example.net/MyServices/WP.asmx/Authorisation?PMSRequest="{\"Number\":\"22\"}
我明白了
[InvalidOperationException: Request format is unrecognized for URL unexpectedly ending in '/Authorisation'.]