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.