我有以下代理服務正在通過代理服務進行調用。WSO2 ESB保留有效負載消息
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="seq_invchk_slpa_in" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<log level="custom">
<property name="STATUS::" value="***************************"/>
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:hnb="http://10.104.74.93/hnb"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<hnb:CheckInvoiceDetails soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<invoice_no xsi:type="xsd:string">$1</invoice_no>
</hnb:CheckInvoiceDetails>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:invoice_no"/>
</args>
</payloadFactory>
<property name="ContentType" scope="axis2" type="STRING" value="text/xml"/>
<header name="Action" scope="default" value="CheckInvoiceDetails"/>
<property name="SOAPAction" scope="transport" type="STRING" value="CheckInvoiceDetails"/>
<send>
<endpoint key="gov:INVCHK/SLPA/endpoints/invchk_slpa_validation_ep.xml"/>
</send>
</sequence>
從一個工具(SOAP UI)調用時,該服務沒有任何問題。
但是當從系統調用時出現問題。我所描繪出到目前爲止 是正確的通話過程中有效載荷工廠消息作爲
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hnb="http://10.104.74.93/hnb" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<hnb:CheckInvoiceDetails soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<invoice_no xmlns="http://ws.apache.org/ns/synapse" xsi:type="xsd:string">17231374967185</invoice_no>
</hnb:CheckInvoiceDetails>
</soapenv:Body>
</soapenv:Envelope>
當錯誤調用時的有用消息走出ESB作爲
<?xml version="1.0" encoding="UTF-8"?>
<hnb:CheckInvoiceDetails xmlns:hnb="http://10.104.74.93/hnb" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<invoice_no xmlns="http://ws.apache.org/ns/synapse" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xsd:string">17231374967185</invoice_no>
</hnb:CheckInvoiceDetails>
這我認爲導致了這個問題。我錯誤的通話過程中從客戶得到的迴應是
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap .org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode>
<faultstring xsi:type="xsd:string">Operation '' is not defined in the WSDL for this service</faultstring>
<detail xsi:type="xsd:string" />
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我怎樣才能保持SOAP消息,因爲它是和它發送出去由系統調用時。
爲什麼肥皂命名空間中 方法級別 <hnb:CheckInvoiceDetails xmlns:hnb="http://10.104.74.93/hnb" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
任何幫助將是非常讚賞混錯。
將它保存在屬性。然後在需要使用補充時恢復。 –
simar
感謝您的評論,但發送消息更改時,這是問題,爲什麼要添加肥皂名稱空間的任何線索? – Yasothar
PayloadFactory介體被設計爲更改消息體的內容。爲什麼你有信封,標題和正文標籤。 WSOESB將在通過傳輸傳輸消息之前將信封添加到消息本身。 – simar