It might be a simple question, but i am stuck with it in the past few days so
any help would be appreciated.
I have a route that looks like this:
<route>
<from uri="direct:foobar" />
<choice>
<when>
<simple>${in.headers.foo} == 'foo1'</simple>
<bean ref="fooBean1" />
</when>
<when>
<simple>${in.headers.foo} == 'foo2'</simple>
<bean ref="fooBean2" />
</when>
</choice>
<choice>
<when>
<simple>${in.headers.bar } == 'bar1'</simple>
<to uri="bean:barBean?method=barMethod" />
</when>
</choice>
</route>
foo and bar headers are pre-populated from the Producer i am using.
What happens is that each expression is evaluated to true. A look in the
code showed that <simple> evaluates just the existence of a header.
I also tried ognl, xpath and others but nothing seems to work.
My exchange is a default exchange with a DTO as payload. Am i missing
something???
--
View this message in context:
http://www.nabble.com/Endpoint-decision-based-on-Header-Value-with-XML-configuration-tp20811772s22882p20811772.html
Sent from the Camel - Users mailing list archive at Nabble.com.