You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jejmaster <je...@gmail.com> on 2010/03/30 10:31:56 UTC
Setting Content-Type Header to route
Hi,
I would like to ask on how to set the content-type header into the camel
route with transform method.
<route>
<from uri="direct:testEndpoint"/>
<to uri="direct:testEndpoint2"/>
<transform>
<simple><tag> ${body} </tag></simple>
</transform>
</route>
How will I set the content-type header to application/xml ?
Thank you in advance.
--
View this message in context: http://old.nabble.com/Setting-Content-Type-Header-to-route-tp28078485p28078485.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Setting Content-Type Header to route
Posted by Willem Jiang <wi...@gmail.com>.
Hi
Which version of Camel are you using?
If you are using Camel 2.x
You can set the content-type like this
<route>
<from uri="direct:testEndpoint"/>
<to uri="direct:testEndpoint2"/>
<setOutHeader headerName="Content-Type">
<constant>application/xml</constant>
</setOutHeader>
<transform>
<simple><tag> ${body} </tag></simple>
</transform>
</route>
Willem
jejmaster wrote:
> Hi,
>
> I would like to ask on how to set the content-type header into the camel
> route with transform method.
>
> <route>
> <from uri="direct:testEndpoint"/>
> <to uri="direct:testEndpoint2"/>
> <transform>
> <simple><tag> ${body} </tag></simple>
> </transform>
> </route>
>
> How will I set the content-type header to application/xml ?
>
> Thank you in advance.
>
>