1

我在 Mac OSX 10.6 上使用 WSO2 4.0.3 我启用了数据服务服务器功能(3.2.2

在 wso2esb 4.0.3 中使用聚合中介。

下面是代码,其中迭代调解器运行良好,但聚合调解器似乎没有被识别,因为它的日志没有被打印出来。来自端点的响应被打印在日志级别=充满外序,但总体上没有继续流动。

wso2team 中的任何人都可以确认 wso2 esb 4.0.3 中的聚合行为是否符合预期吗?

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="test" transports="http https" startOnLoad="true" trace="disable" statistics="enable">
<target>
    <inSequence >
        <log level="full" separator=",">
            <property name="InSequence-EntryMessage" value="test - Entering InSequence."/>
        </log>
        <iterate preservePayload="true" attachPath="//REQ" expression="//REQ/MODULE">
            <target>
                <sequence>
                    <payloadFactory>
                        <format>
                            <MODULE>
                                <party_id>$1</party_id>
                            </MODULE>
                        </format>
                        <args>
                            <arg expression="//REQ/MODULE/party_id"/>
                        </args>
                    </payloadFactory>
                    <log level="full" separator=",">
                        <property name="InSequence-iterate" value="formed after iterate"/>
                    </log>
                    <send>
                        <endpoint key="conf:/test/ds_endpoint.xml"/>
                    </send>
                </sequence>
            </target>
        </iterate>
        <log level="custom" separator=",">
            <property name="InSequence-ExitMessage" value="test - Exiting InSequence."/>
        </log>
    </inSequence>
    <outSequence >
        <log level="full" separator=",">
            <property name="ValidResponse" value="test  Sending the Response Back."/>
        </log>
        <aggregate>
            <log level="full" separator=",">
                <property name="ValidResponse" value="TEST ---------------- Sending the Response Back."/>
            </log>
            <correlateOn expression="//TEST"/>
            <completeCondition> 
                <messageCount min="-1" max="-1"/> 
            </completeCondition> 
            <onComplete expression="//TESTALL">
            <log level="full" separator=",">
                <property name="ValidResponse" value="TEST 1 ---------------- Sending the Response Back."/>
            </log>
            <send/>
            </onComplete>
         </aggregate>
        <log level="full" separator=",">
            <property name="OutSequence-ExitMessage" value="test - Exiting OutSequence."/>
        </log>
    </outSequence>
</target>
</proxy>

感谢对此的回应!

4

1 回答 1

2

日志中介仅适用于聚合中介的“onComplete”标签内。因此无法识别以下日志,这是预期的行为,

<log level="full" separator=",">
   <property name="ValidResponse" value="TEST ---------------- 发回响应。"/>
  </log>

但是您在“onComplete”标签中添加的以下日志应该可以工作,

<log level="full" separator=",">
<property name="ValidResponse" value="TEST 1 ---------------- 发回响应。"/>
</log>
于 2013-05-10T07:05:30.400 回答