0
我有一個預編譯的類,我的輸入SOAP消息應該適合。
字段和順序一切都是正確的,除了命名空間,我試着在@webservice中以及在輸入SOAP xmlns中添加相同的命名空間。
但我收到以下錯誤。如何在SOAP請求中正確定義名稱空間?
我的服務:
@WebService(serviceName = "OTMTransService",targetNamespace="http://xmlns.oracle.com/apps/otm/transmission/v6.4")
public class OTMTransServiceImpl implements OTMTransService{
XML輸入我打,
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:trm="http://receiver.tms.renault">
<soapenv:Header/>
<soapenv:Body>
<trm:publish>
<Transmission>
<TransmissionHeader/>
<TransmissionBody>...
</TransmissionBody>
</Transmission>
</trm:publish>
</soapenv:Body>
</soapenv:Envelope>
輸出我得到,
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Unmarshalling Error: unexpected element (uri:"", local:"TransmissionHeader"). Expected elements are <{http://xmlns.oracle.com/apps/otm/transmission/v6.4}TransmissionBody>,<{http://xmlns.oracle.com/apps/otm/transmission/v6.4}TransmissionHeader> </faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
我已經更新了細節..請幫助 –