Hi,

I have defined a route as follows, where in based on the class type of the
object returned by the servicebean method I want to try some header.

However no matter what, it always sets the header value to all exchanges
even if the body has object of some other type.

I suspect that probably simple expression is being incorrectly configured by
me.

Any idea?

Thnaks 
Sameer

<camel:route>
        <camel:from ref="inboundQ" />
        <camel:unmarshal>
                <camel:jaxb contextPath="packagename.where.objectfactory.is" />
        </camel:unmarshal>
        <camel:bean ref="servicebean" />
        <camel:choice>
                        <camel:when>
                                <camel:simple>$body.type is 
'my.domain.ClassA'</camel:simple>
                                <camel:setHeader headerName="myHeader">
                                        
<camel:constant>headervalue</camel:constant>
                                </camel:setHeader>
                        </camel:when>
        </camel:choice>
        <camel:to ref="outboundQ"></camel:to>
</camel:route>
-- 
View this message in context: 
http://www.nabble.com/%27body.type-is%27-not-working%21-tp25530344p25530344.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to