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 <dunn...@yahoo.com> 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:
>
>      <to uri="velocity://tohtml.vm"/>
>
> 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 <https://twitter.com/bibryam>

Author of Instant Apache Camel Message Routing
http://www.amazon.com/dp/1783283475

Reply via email to