我正在嘗試連接到第三方SOAP Web服務。當HTTP SOAPAction標頭爲空字符串(「」)時,似乎該服務可以工作。這是WSDL的片段:設置SOAPAction HTTP標頭時出現Axis2問題
<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 = 「」
我產生stubusing 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。
感謝, 羅南
我試過,沒有運氣。 做的事情是設置選項的屬性。 謝謝 – rperez 2009-10-07 09:54:16