wso2esb死信通道在版本4.9.0中不起作用

时间:2016-03-24 06:55:12

标签: wso2 wso2esb

非常简单的问题。我正在使用vanilla wso2esb 4.9.0并试用死信通道设计。它失败!存储在队列中的消息是端点收到的soap错误错误。我究竟做错了什么?这工作正常吗?我所关注的例子是:https://docs.wso2.com/display/IntegrationPatterns/Dead+Letter+Channel

<proxy xmlns="http://ws.apache.org/ns/synapse" name="Proxy1"
transports="https,http" statistics="disable" trace="disable"
startOnLoad="true">
<target>
    <inSequence>
        <log level="full" />
    </inSequence>
    <outSequence>
        <log level="full">
            <property name="MSG" value="Response...." />
        </log>
        <send />
    </outSequence>
    <faultSequence>
        <log level="full">
            <property name="MSG" value="++++++++++FAULT---------...." />
        </log>
        <property name="target.endpoint" value="ReportDataTransferServiceEp" />
        <store messageStore="ReportMessageStore" />
    </faultSequence>
    <endpoint>
        <address uri="http://localhost:8080/TestSoapESB/webservices/ReportDataTransferService" />
    </endpoint>
</target>
<publishWSDL
    uri="http://localhost:8080/TestSoapESB/webservices/ReportDataTransferService?wsdl" />
<description></description>

1 个答案:

答案 0 :(得分:0)

作为inside outSequence,你知道当前消息是响应而不是inSequence中接收的初始消息,在faultSequence中,你不能依赖于初始消息将保持不变的事实:你必须将它保存在inSequence的顶部并在faultSequence中调用store之前恢复它:

保存:

<enrich>
    <source type="envelope" clone="true"/>
    <target type="property" property="INPUT_MESSAGE"/>
</enrich>

恢复:

<enrich>
    <source type="property" clone="false" property="INPUT_MESSAGE"/>
    <target type="envelope"/>
</enrich>