You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Lydie <lp...@completegenomics.com> on 2014/04/10 22:55:57 UTC

simple predicate header

I am trying to get a choice based on the value in a header:

				<choice>
					<when>
						<simple> ${header.Authorization} == 'enabled' </simple>



where when I log the value with :
<log message="***************** ${header.Authorization}***************" />

 I get
3:55:05,022 INFO  [proxy] (qtp1271679061-127) *****************
enabled***************



It does not work:

Caused by:
org.apache.camel.language.simple.types.SimpleIllegalSyntaxException:
expected symbol whiteSpace but was singleQuote at location 25
${header.Authorization}=='enabled'


Could you please help?

Thank you







--
View this message in context: http://camel.465427.n5.nabble.com/simple-predicate-header-tp5750074.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: simple predicate header

Posted by Willem Jiang <wi...@gmail.com>.
Hi

You need to add space between the equals, just like this 

${header.Authorization} == 'enabled' 


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On April 11, 2014 at 4:56:33 AM, Lydie (lprevost@completegenomics.com) wrote:
>  
> I am trying to get a choice based on the value in a header:
>  
>  
>  
> ${header.Authorization} == 'enabled'  
>  
>  
>  
> where when I log the value with :
>  
>  
> I get
> 3:55:05,022 INFO [proxy] (qtp1271679061-127) *****************
> enabled***************
>  
>  
>  
> It does not work:
>  
> Caused by:
> org.apache.camel.language.simple.types.SimpleIllegalSyntaxException:
> expected symbol whiteSpace but was singleQuote at location 25
> ${header.Authorization}=='enabled'
>  
>  
> Could you please help?
>  
> Thank you
>  
>  
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/simple-predicate-header-tp5750074.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.
>