I was just about to apply it then spotted Willem beat me to it :) Nice
work guys!
2008/6/17 Stephen J <[EMAIL PROTECTED]>:
>
> I have submitted a potential patch to fix this issue. Please check the jira
> and let me know.
>
>
> Hadrian Zbarcea wrote:
>>
>> setHeader() will add the header, that's correct.
>>
>> We'll make sense out of this. If you could turn your test into a
>> junit test and attach it to the jira, it would be highly appreciated.
>>
>> Hadrian
>>
>> On Jun 17, 2008, at 12:59 PM, Stephen J wrote:
>>
>>>
>>> This:
>>>
>>> $in.setHeader('fruit', 'apple')
>>>
>>> didn't seem to work.
>>>
>>> In my post velocity processor I tried to return the value like this:
>>>
>>> System.out.println(exchange.getIn().getHeader('fruit'));
>>>
>>> and it returns 'null'
>>>
>>> I also have some code that iterates through all the headers in the
>>> "in"
>>> message and the only thing that appears is the
>>> org.apache.camel.velocity.resource header.
>>>
>>> One other thing that I want to be sure about. This setHeader()
>>> statement
>>> will add the header if it doesn't exist, correct?
>>>
>>> James.Strachan wrote:
>>>>
>>>> 2008/6/17 Stephen J <[EMAIL PROTECTED]>:
>>>>>
>>>>> none of the below work:
>>>>> #set( $in.headers.fruit = 'apple' )
>>>>> #set( $headers.fruit = 'apple' )
>>>>> $in.headers.fruit = 'apple'
>>>>> $headers.fruit = 'apple'
>>>>
>>>> I'm not sure if the velocity pseudo-bean properties stuff works with
>>>> the Camel Exchange / Message interfaces.
>>>>
>>>> Does this work?
>>>>
>>>> $in.setHeader('fruit', 'apple')
>>>>
>>>> Maybe we could write a custom Velocity class to help its
>>>> introspection
>>>> stuff work with Exchange/Message interfaces? (Have never tried - not
>>>> even sure its possible)
>>>>
>>>> --
>>>> James
>>>> -------
>>>> http://macstrac.blogspot.com/
>>>>
>>>> Open Source Integration
>>>> http://open.iona.com
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Exchange-headers-in-velocity-tp17916457s22882p17920420.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Exchange-headers-in-velocity-tp17916457s22882p17937402.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com