camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martin11 <mato.kraj...@gmail.com>
Subject Propery Placeholder within WHEN
Date Mon, 12 Nov 2012 09:26:23 GMT
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.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message