Hi
A cookie is just a HTTP header, so you should be able to set a cookie
by setting a header in Camel
For example in your getAutheticationDummyProcessor you can set a header
exchange.getIn().setHeader("Cookie", someValue);
Mind about IN vs OUT see this faq
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
On Sat, Nov 12, 2011 at 7:22 PM, Abhijith <[email protected]> wrote:
> Hi,
>
> How to set Cookie before routing the request another service URL?
>
> I am trying to develop a route which receives the JSON request and set the
> values from JSON to HttpServletRequest Attribute
> and sets the cookie on the request which is saved in DB and routes it to
> another URL.
>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
>
> <dataFormats>
> <json id="requestVO" library="Jackson"
> unmarshalTypeName="com.app.RequestVO" />
> <json id="responseVO" library="Jackson"
> unmarshalTypeName="java.util.HashMap" />
> </dataFormats>
>
> <route>
> <from uri="servlet:///getData" />
> <unmarshal ref="requestVO" />
> <process ref="getAutheticationDummyProcessor" />
> <to uri="http://localhost:7488/getTheData">
> <marshal ref="responseVO" />
> </route>
>
> </camelContext>
>
>
> Thanks,
> Abhi
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-set-Cookie-before-routing-the-request-to-another-service-URL-tp4987385p4987385.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/