我有一个SOAP代理服务和一个数据映射器来创建输出。创建的响应没有soap信封标记。如果我尝试使用有效负载工厂添加信封,它会去掉信封(但保留Body元素)。我使用的是WSO2 EI 6.4.0。
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="EstrattoContoEntiTributi" startOnLoad="true" transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
...
<send>
<endpoint key="..."/>
</send>
</inSequence>
<outSequence>
<datamapper .../>
<send/>
</outSequence>
<faultSequence/>
</target>
</proxy>发布于 2019-08-15 12:35:42
我们需要使用属性中介器,如下所示。
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="PF2"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="http,https">
<target>
<inSequence>
<payloadFactory media-type="xml">
<format>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsd="http://services.samples/xsd"
xmlns:ser="http://services.samples">
<soap:Header/>
<soap:Body>
<ser:getQuote>
<ser:request>
<xsd:symbol>IBM</xsd:symbol>
</ser:request>
</ser:getQuote>
</soap:Body>
</soap:Envelope>
</format>
<args/>
</payloadFactory>
<property name="messageType" scope="axis2" type="STRING" value="text/xml"/>
<log level="full">
<property name="ChangedEnve" value="----Changed-------"/>
</log>
<respond/>
</inSequence>
</target>
<description/>
</proxy>希望这对你有帮助,https://medium.com/@isuruuy/how-to-construct-a-payload-with-the-soap-envelope-ce8df5032dda
https://stackoverflow.com/questions/57490262
复制相似问题