Propagating HttpContext & setting HttpContext

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Propagating HttpContext & setting HttpContext

paramjyotsingh
I have two questions and here are scenarios:-

1) <from uri="http://<host>:<port>/?serviceClass=a.b.TestClass" />
       <to uri="http://<host>:<port>/anotherExternalServiceUri"/>

    In this case suppose we get information like Locale, User in HttpContext. How do we propagate it in camel to other services. In this example how do we propagate HttpContext from first service to second one.

2) <from uri="quartz://myGroup/myTimerName?cron=0+0/5+12-18+?+*+MON-FRI" />
    <to uri="http://<host>:<port>/someserviceuri" />

    How do we set Locale in HttpContext before invoking the HTTP restful service.

Thanks and Regards,
Param
Reply | Threaded
Open this post in threaded view
|

Re: Propagating HttpContext & setting HttpContext

Claus Ibsen-2
Hi

What version of Camel do you use?

And which HttpContext class do you refer to? I dont think there is
such a class in Apache Http Client 3.1, which is what camel-http uses.

Maybe you want to use Apache Http Client 4.x which is the camel-http4 component
http://camel.apache.org/http4

Which mean you should use "http4" as the component name.


On Fri, Dec 28, 2012 at 8:36 AM, paramjyotsingh
<[hidden email]> wrote:

> I have two questions and here are scenarios:-
>
> 1) <from uri=&quot;http://&lt;host>:<port>/?serviceClass=a.b.TestClass" />
>        <to uri=&quot;http://&lt;host>:<port>/anotherExternalServiceUri"/>
>
>     In this case suppose we get information like Locale, User in
> HttpContext. How do we propagate it in camel to other services. In this
> example how do we propagate HttpContext from first service to second one.
>
> 2) <from uri="quartz://myGroup/myTimerName?cron=0+0/5+12-18+?+*+MON-FRI" />
>     <to uri=&quot;http://&lt;host>:<port>/someserviceuri" />
>
>     How do we set Locale in HttpContext before invoking the HTTP restful
> service.
>
> Thanks and Regards,
> Param
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Propagating-HttpContext-setting-HttpContext-tp5724656.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen