You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sm_piilay <sm...@gmail.com> on 2010/07/21 18:16:44 UTC
xml based CBR with choice predicate to rootNode
I have a simple xml message as follows:
<TEST>
<USER> USERNAME</USER>
</TEST>
I have the following camel-context.xml to route the messages to a queue
based on the rootNode i.e.TEST. The xpath predicate doesnt seems to work.
Thanks for your help.
***
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="jbi:endpoint:http://net.test/jms/InQueue"/>
<choice>
<when>
<xpath>"//TEST"</xpath>
<to uri="jbi:endpoint:http://net.test//jms/OutQueue"/>
</when>
<otherwise>
<to uri="jbi:endpoint:http://net.test//jms/ErrorQueue"/>
</otherwise>
</choice>
</route>
</camelContext>
***
I had tried without the double qoute and also plain /TEST.
Currently all the messages are going to OutQueue.
Thanks
SMP.
--
View this message in context: http://camel.465427.n5.nabble.com/xml-based-CBR-with-choice-predicate-to-rootNode-tp1734551p1734551.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: xml based CBR with choice predicate to rootNode
Posted by sm_piilay <sm...@gmail.com>.
I figured it out..
I added a namespace for the xml and also added that namespace in
camelcontext and it worked.
Regards.
--
View this message in context: http://camel.465427.n5.nabble.com/xml-based-CBR-with-choice-predicate-to-rootNode-tp1734551p1754939.html
Sent from the Camel - Users mailing list archive at Nabble.com.