camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dare <robert.d...@gmail.com>
Subject Re: POJO Routing
Date Fri, 19 Aug 2011 16:10:07 GMT
Thank you so much Claus!

That did the trick.  Simple was exactly what I was looking for!


On Fri, Aug 19, 2011 at 10:49 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> On Fri, Aug 19, 2011 at 4:25 PM, Robert Dare <robert.dare@gmail.com>
> wrote:
> > Hi Everyone,
> >
> > I have not been able to find any documentation or examples on using the
> > "<choice>" elements with pojo based routing.
> >
> > I am using the Spring XML Extensions to define a route.  I can not figure
> > out how to to test the body with a "<when>" structure.  Using the
> "<xpath>"
> > element is obviously wrong since the message is a pojo and not
> > org.w3c.dom.Node.
> >
> > Is there any way to this with the Spring XML?
> >
> > I have tried adding Headers in my producer:
> >
> > producer.sendBodyAndHeader(body, "MyHeader", "SuperHeader");
> >
> > ...but I have not been able to retrieve those headers in the XML route.
> >
>
> You can use any of the scripting languages.
> http://camel.apache.org/languages.html
>
> However I suggest to start look at the built in language named Simple
> http://camel.apache.org/simple
>
> Then its a matter of
>
> <when>
>   <simple>${header.MyHeader}} == 'SuperHeader'</simple>
>   ...
> </when>
>
> Mind that you must have spaces around the == operator. In fact all the
> operators supported by Simple.
>
>
>
>
> > Thanks in advance,
> >
> > Rob
> >
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message