camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel XPath....Parsing a part of message Body...
Date Sat, 05 Apr 2014 05:28:29 GMT
Hi

The xpath should not have " " around it

On Fri, Apr 4, 2014 at 8:45 PM, npa <npa.ccdb@gmail.com> wrote:
> I have a simple flow that reads from an activemq1 and parses an id from the
> message and sends the id across to another activemq2.
>
> Here is an example of message that gets written to activemq1:
>
> <Customer>
>   <Order>
>      <id>123</id>
>   </Order>
> <Customer>
>
> I need to parse out the id from the above message body and send the below
> message to activemq2:
>
> "Order with id{123} has been queued"
>
> This is the flow that I cameup with, but it writes the complete request xml
> to the queue, but not the message that I am looking for:
>
> <from uri="jms:queue:Q.activemq1"/>
>    <setBody>
>         <xpath>"/Customer/Order/id/@value/text()"</xpath>
>     </setBody>
>  <to uri="jms:queue:Q.activemq2"/>
>
> Anything wrong in the above
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-XPath-Parsing-a-part-of-message-Body-tp5749823.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Mime
View raw message