我需要從WSO2 ESB代理服務發送MTOM編碼請求。 我在設置參數:WSO2 ESB從代理服務發送MTOM編碼請求
<property name="enableMTOM" value="true" scope="axis2" type="STRING"/>
<property name="messageType" value="multipart/related" scope="axis2" type="STRING"/>
它工作正常。
頁眉請求:
POST /alfresco/cmisws/DiscoveryService HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/related; boundary="MIMEBoundary_a62df4c2a350faee72d4e9faf54c07e7135aa06bcf30bf02"; type="application/xop+xml"; start="<[email protected]>"; start-info="text/xml"
SOAPAction: "urn:mediate"
Transfer-Encoding: chunked
Host: 127.0.0.1:8181
Connection: Keep-Alive
User-Agent: Synapse-PT-HttpComponents-NIO
67b
--MIMEBoundary_a62df4c2a350faee72d4e9faf54c07e7135aa06bcf30bf02
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>
但我需要調用我的代理服務的HTTP GET。所以當我需要從代理服務發送MTOM編碼請求時,我在端點定義中設置了附加屬性format =「soap11」。 並且消息不再是MTOM編碼 - 內容類型是text/xml。
POST /alfresco/cmisws/DiscoveryService HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml
Transfer-Encoding: chunked
Host: 127.0.0.1:8181
Connection: Keep-Alive
User-Agent: Synapse-PT-HttpComponents-NIO
678
--MIMEBoundary_c62df4c2a350faee60d6513af54c07e7035aa06bcf30bf02
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>
無需格式= 「soap11」 屬性我'得到錯誤
SequenceMediator Error while building message
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,530]
Message: The element type "body" must be terminated by the matching end-tag "</body>".
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
序列deffinition:
<sequence xmlns="http://ws.apache.org/ns/synapse" name="GetDocIdFromAlfresco">
<property name="enableMTOM" value="true" scope="axis2" type="STRING"/>
<property name="messageType" value="multipart/related" scope="axis2" type="STRING"/>
<payloadFactory media-type="xml">
.
.
.
</payloadFactory>
<call>
<endpoint>
<address uri="http://localhost:8080/alfresco/cmisws/DiscoveryService" format="soap11"/>
</endpoint>
</call>
<respond/>
</sequence>
如何從被稱爲HTTP GET代理服務發送MTOM編碼的請求?
將優化=「mtom」屬性添加到您的地址端點使其工作? – RaviU
不,optimize =「mtom」屬性與設置 具有相同的效果。 –
tyfyh