You set the body to constant value, so you have constant value. Use EL
expression instead of constant one if you want it to be evaluated.

In simple words put <el> where you have <constant> ;)

Roman

2009/9/27 titexe <abdellatifbouch...@eurofins.com>:
>
> Hello,
>
> I'm trying to develop a route camel who can:
>
> Retrieve a value from the header of a message
> and put this value in an SQL query.
>
> Below my configuration:
>
> <route>
>  <from uri="activemq:topic:XML.OUT.qmirror" />
>  <setBody>
>       <constant>UPDATE CAMEL SET B='${in.header.MessageId}' WHERE
> C=2</constant>
>  </setBody>
>  <to uri="jdbc:testdb" />
>  </route>
>
> When I tested this variable ${in.header.MessageId}, I retrieve its value,
> unlike when I put this variable in the SQL query.
>
> Otherwise, the SQL executes perfectly.
>
> Thank you in advance for helping me complete this route
>
> Best regards,
>
> titexe
> --
> View this message in context: 
> http://www.nabble.com/Route-Camel-%3A-Pass-variables-in-a-SQL-query-tp25635878p25635878.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Reply via email to