Hi

What version of Camel are you using?


On Mon, Nov 12, 2012 at 10:26 AM, martin11 <[email protected]> wrote:
> Hello,
>
> I`m trying to setup message header with constant from property file. When I
> use following XML configuration everything works perfect and I got what I
> expected.
> <camel:route id="timer-to-ws">     <camel:from
> uri="timer://foo?fixedRate=true&amp;amp;period=4s"/>     <camel:setHeader
> headerName="x-ssl-certificate">
> <camel:constant>{{property.test.cert}}</camel:constant>
> </camel:setHeader> </camel:route>
> Unfortunately I added a condition where I want to chceck if the property
> exist and when it exist (is not empty string) then it will be setup in
> message header. See my updated context:
> <camel:route id="timer-to-ws">     <camel:from
> uri="timer://foo?fixedRate=true&amp;amp;period=4s"/>     <camel:when>
> <camel:simple>'{{property.test.cert}}' not regex
> '^[\s]*[\s]*$'</camel:simple>         <camel:setHeader
> headerName="x-ssl-certificate">
> <camel:constant>{{property.test.cert}}</camel:constant>
> </camel:setHeader>     </camel:when> </camel:route>
> Now in message header i got string "{{property.test.cert}}" instead of
> string from property files like it was before (previous context).
>
> *What is bad on using property placeholder inside WHEN clausule? How I
> should use it?*
>
> Thank you!
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Propery-Placeholder-within-WHEN-tp5722577.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to