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 <[EMAIL PROTECTED]> wrote:
> On 11/10/2007, William Tam <[EMAIL PROTECTED]> 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
>

Reply via email to