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: Write routing condition in xml config file
Date Wed, 04 Feb 2009 10:52:59 GMT
On Wed, Feb 4, 2009 at 11:39 AM, mta38 <mtaraud.ext@orange-ftgroup.com> wrote:
>
> Hi all,
> Is someone can say me how to test a header exchange value in a xml config
> file.
> For example, if the header TEST exists in my " IN "message and its value is
> 10, I want to do the following:
>
> <route>
>        <from uri="…"
>        <choice>
>                <when>
>                        In.header.TEST==10
>                        <to uri="…"/>
>                </when>
>
>                …
>        </choice>
>
> </route>
> Any help are welcome,
See this wiki page:
http://camel.apache.org/content-based-router.html

The $ notation will get the header.

So you should do:
<xpath>$TEST = '10'</xpath>

Otherwise you can try some of the other languages
http://camel.apache.org/languages.html

... that can do = comparison, such as EL.
http://camel.apache.org/el.html

And the xpath is documented here:
http://camel.apache.org/xpath.html



>
> Best regards
>
> Mta38
>
> --
> View this message in context: http://www.nabble.com/Write-routing-condition-in-xml-config-file-tp21828008s22882p21828008.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Mime
View raw message