我打了最後兩天有同樣的問題,我不知道如何解決這個問題。甚至不知道這是否是錯誤。CXF不正確的WSDL自動生成?
我有一個CXF Web服務,我覺得很奇怪,我想修復。這是一個調用的Web服務涉及:
@WebResult (name="merchantHierarchyParentResponse") MerchantHierarchyParentResponseDTO
getParent(
@WebParam(name="institutionNumber") @XmlElement(required=true) String institutionNumber,
@WebParam(name="clientNumber") String clientNumber,
@WebParam(name="ourReference") String ourReference,
@WebParam(name="accessMerch") String accessMerch,
@WebParam(header=true, name="callerId") String callerId,
@WebParam(header=true, name="timestamp") String timestamp,
@WebParam(header=true, name="signature") String signature
);
正如你所看到的,它接收4個正常參數加在頭3個額外的參數(來電顯示,時間戳和簽名)。
它編譯成功。然後,我也將它成功部署到WebLogic服務器中。
最後,我使用SoapUI來測試它。我向SoapUI提供了WebLogic爲我提供WSDL的URL。這是,我沒有在自動生成的WSDL中進行任何更改。這是我得到這個getParent在SoupUI:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webService.webservice.omnipay.com.server/">
<soapenv:Header>
<web:signature>?</web:signature>
<web:timestamp>?</web:timestamp>
<web:callerId>?</web:callerId>
</soapenv:Header>
<soapenv:Body>
<web:getParent>
<institutionNumber>?</institutionNumber>
<!--Optional:-->
<clientNumber>?</clientNumber>
<!--Optional:-->
<ourReference>?</ourReference>
<!--Optional:-->
<accessMerch>?</accessMerch>
</web:getParent>
<web:callerId>?</web:callerId>
<web:timestamp>?</web:timestamp>
<web:signature>?</web:signature>
</soapenv:Body>
</soapenv:Envelope>
我的問題是非常清楚。我在標題部分(callerId,timestamp和signature)中看到3個參數,但爲什麼這3個參數在主體部分的末尾仍然是AGAIN。我不希望他們在身體部位,我只希望他們在頭部。
任何想法爲什麼會發生這種情況?這是一個錯誤嗎?
請將您的評論複製到此問題的答案,並在此問題修復後予以批准。因此,這個問題不會在系統中顯示出未答覆的廣告。 –