-
1. Re: Setting headers on messages passed to the Invoker
kcbabo Jul 11, 2012 9:02 AM (in response to edevera)There is not a way to do this with the current Invoker sendInOnly() and sendInOut() methods. You can, however, use the Invoker.createExchange() method to create a SY exchange and then grab the Context from there. Properties you set on the context should be available in the Camel route/message via the Camel message composer, IINM.
We could make it easier to specify a bag of properties on the call to sendInOnly and sendInOut. Under the covers, the properties would be set on the underlying exchange before it's sent. Of course, this begs the question of whether the context properties should be available upon return (e.g. you set a header for the return message in your service and want to assert it's set).
I would say document the requirements you have in a JIRA and we can take it from there. I can see a number of ways to make this easier and more powerful than what we have today.