我正在尝试共同连接到第 3 方 SOAP Web 服务。当 HTTP SOAPAction标头为空字符串 ("") 时,服务似乎可以工作。这是 wsdl 的片段:
<wsdl:binding name="detailsRequestMessage" type="tns:UssdPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="details">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
你在哪里看到soapAction=""
我使用 Axis2 (1.5) wsdl2java 生成了一个存根。
我希望得到以下结果(使用SoapUI运行时的成功输出):
POST /details HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: some.host
Content-Length: 323
但相反,我得到:
POST /details HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://some.url/wsussd/ussdtypes/UssdPortType/detailsRequest"
User-Agent: Axis2
Host: some.host
Content-Length: 300
有谁知道问题是什么或者我如何在程序中设置soapAction。
谢谢,罗南