camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Tam" <email.w...@gmail.com>
Subject Re: Content Based Router Spring XML
Date Thu, 11 Oct 2007 19:40:28 GMT
It changed to below using xpath and it worked (thanks!).  However, my
message body had to be a XML doc (even though my predicate was only
checking the header).  Is it a bug?

                <when>
                    <xpath>$foo = 'bar'</xpath>
                    <to uri="seda:b"/>
                </when>

                <when>
                    <xpath>$foo = 'cheese'</xpath>
    	            <to uri="seda:c"/>
                </when>


On 10/11/07, James Strachan <james.strachan@gmail.com> wrote:
> On 11/10/2007, William Tam <email.wtam@gmail.com> wrote:
> > The XML config example in the doc seems to be obsolete
> > http://activemq.apache.org/camel/content-based-router.html.
>
> Fancy editing that? :)
>
> >   I am
> > trying to use the Simple language support.  Does "${in.header.foo} =
> > 'bar'" look right?  I am trying to say "if in.header foo equals to
> > 'bar'".  It does not seem to work.
>
> The simple language doesn't yet support predicates unfortunatey. I
> recommend you use either EL,  XPath or Groovy
>
> http://activemq.apache.org/camel/languages.html
>
> XPath is a good choice as it doesn't add any new dependencies; you can
> evaluate XPath from camel-core.
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source SOA
> http://open.iona.com
>

Mime
View raw message