我已經實現了一個web服務內部使用的webservice客戶端(使用Spring),並且這個客戶端獲得了一個響應,在這個響應中CXF保護並給了我一個錯誤消息。CXF webservice客戶端,如何處理來自被調用的webservice的響應?
的錯誤信息是:
服務器無法識別的HTTP標頭值的SOAPAction
我已經發現了這個問題,但不知道我能做些什麼來調整我的web服務響應處理。
下面的xml響應沒有任何問題。
工程,並接受好!
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bar="http://www.dummyurl.com/service-v1.0/">
<soapenv:Header/>
<soapenv:Body>
<bar:StartSessionResponse>
<result>1</result>
</bar:StartSessionResponse>
</soapenv:Body>
</soapenv:Envelope>
服務實際上返回:
失敗,並給我一個錯誤!
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<StartSessionResponse xmlns="www.dummyurl.com/service-v1.0/">
<result xmlns="">1</result>
</StartSessionResponse>
</soap:Body>
</soap:Envelope>
據我可以看到不同的是在
的xmlns =「www.dummyurl.com/service-v1.0/元件的放置,在成功xml的是在ENVELOPPE,在失敗的XML它是在方法效應初探。
有,我可以說服CXF接受響應的方式嗎?或者是服務回饋異常結果?