我在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>
感谢对此的回应!
答案 0 :(得分:2)
Log mediator仅适用于Aggregate mediator中的“onComplete”标记。因此,无法识别以下日志,这是预期的行为,
<log level="full" separator=","> <property name="ValidResponse" value="TEST ---------------- Sending the Response Back."/> </log>
但是您在“onComplete”标记中添加的以下日志应该有效,
<log level="full" separator=","> <property name="ValidResponse" value="TEST 1 ---------------- Sending the Response Back."/> </log>