0
在下面的mule流程中,我使用xpath来决定消息需要发送到哪个队列。但是xpath表达式返回false,即使XML具有tc =“121”。你能告诉我我做错了什么吗?使用XPath Evaluator的骡子选择
下面是由XPath评估的骡流和XML。
骡子流量:
<flow name="ProcessXMLRequest">
<jms:inbound-endpoint exchange-pattern="one-way" queue="mq.xml.request" />
<logger message="XML payload is #[payload]" level="INFO" />
<choice>
<when expression="/TXLife/TXLifeRequest/TransType/@tc='121'"
evaluator="xpath">
<jms:outbound-endpoint queue="mq.121.request.apps" />
</when>
<when
expression="/TXLife/TXLifeRequest/TransType/@tc='1122'"
evaluator="xpath">
<jms:outbound-endpoint queue="mq.1122.request.apps" />
</when>
<otherwise>
<jms:outbound-endpoint queue="mq.error"/>
</otherwise>
</choice>
</flow>
XML:
<TXLife xmlns:ns2="http://abc.com/services/mvi" xmlns="http://ACORD.org/Standards/Life/2">
<TXLifeRequest PrimaryObjectID="Holding_1">
<TransType tc="121">121</TransType>
<TransMode tc="2">2</TransMode>
</TXLifeRequest>
</TXLife>
感谢大卫。现在正在工作。 – user1493140 2012-07-09 21:35:45