-
1. Re: Using the setProperty and SY Context
srini8881 Sep 3, 2013 12:47 PM (in response to srini8881)So figured out the trick.
setProperty from the camel route is always at the EXCHANGE scope. setHeader is at MESSAGE scope. So i reckon using setHeader would make it dependent to the message.
NOTE: Remember that when using the setHeader, the key of the header changes to small letters. For example:
<setHeader headerName="Apple">
....
</setHeader>
when we try to fetch the header value in the bean service, we should say context.getProperty("apple"). This case change has consumed an hour of my time :-(
Thanks
Srini
-
2. Re: Using the setProperty and SY Context
kcbabo Sep 3, 2013 12:53 PM (in response to srini8881)NOTE: Remember that when using the setHeader, the key of the header changes to small letters. For example:
<setHeader headerName="Apple">
....
</setHeader>
when we try to fetch the header value in the bean service, we should say context.getProperty("apple"). This case change has consumed an hour of my time :-(
This is a feature of Camel itself, so there's not much we can do about it from a SY POV. That said, it's definitely an important thing to point out as it's not obvious and easy to get confused. I'm flagging this thread with a docs label so that we can include it in our documentation set.
thanks,
keith