On Wed, Jan 23, 2013 at 10:10 PM, Pranab Mehta <rou...@gmail.com> wrote:
> I am running Camel 2.8, and to proxy a https web service I use the
> following route:
>         from("servlet:///proxyWebService/api/?matchOnUriPrefix=true")
>         .process(myProcessor)
>         
> .to("https4://realWebService:8443/api/?bridgeEndpoint=true&throwExceptionOnFailure=false");
>
> Now, in the process leg, I want to be able to extract the full Request
> URL with hostname and port that was used to access the servlet. I am
> hoping this information is somewhere in the Exchange, but I am unable
> to find it.
>

You can get access to the HttpServletRequest, where you can find all
the details you need.

In the processor you can do

HttpMessage msg = exchange.getIn(HttpMessage.class);
HttpServletRequest req = msg.getRequest();


> tia,
> rouble



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

Reply via email to