As the message header could be override or lost in the processor. My suggest is 
put the old message body into exchange property. Camel is copying the exchange 
properties by default.

--  
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 16, 2014 at 1:23:59 AM, Bilgin Ibryam (bibr...@gmail.com) wrote:
> Velocity will put the result of the evaluation in the message body, you
> cannot change that.
> But you could preserve the existing body by putting it into a header before
> calling velocity template, and then swap the template result with the
> previous body afterwards...
>  
> HTH
>  
>  
>  
> On 15 April 2014 18:13, dunnlow wrote:
>  
> > Sorry, I should have given more detail.
> >
> > I am using velocity to create web pages. My template is an html formatted
> > document (about 40 lines) that uses existing exchange headers. (This gets
> > turned into a web page downstream.)
> >
> > In my (xml) route I have something like:
> >
> >  
> >
> > However, this puts my html template into the BODY. I need to keep the
> > current body intact (downstream routes depend on having the original
> > message) so I want to do this same evaluation, but put the new evaluated
> > template it into a HEADER.
> >
> > Thanks again,
> > -J
> >
> >
> >
> > --
> > View this message in context:
> > http://camel.465427.n5.nabble.com/Set-header-using-velocity-template-tp5750248p5750259.html
> >   
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>  
>  
>  
> --
> Bilgin Ibryam
>  
> Apache Camel & Apache OFBiz committer
> Blog: ofbizian.com
> Twitter: @bibryam  
>  
> Author of Instant Apache Camel Message Routing
> http://www.amazon.com/dp/1783283475
>  

Reply via email to