Re: Extracting request IP in Camel CXF

2011-01-03 Thread goels...@yahoo.com
I am using camel-core-2.5.0.jar, camel-cxf-2.5.0.jar and cxf-api-2.2.11.jar. I am now able to get the remoteAddress using the Request.getRemoteAddress() method. Earlier I was making the mistake of looking at the "_remoteAddress" variable using my debugger instead of actually invoking the method g

Re: Extracting request IP in Camel CXF

2010-12-30 Thread goels...@yahoo.com
Got it! Thanks Willem. Here is what I was doing wrong: In the handleMessage method of my interceptor, I was inspecting the message object using the debugger. It DID contain the HTTP.REQUEST header as I mentioned earlier, but the _remoteAddress variable in the Request object was null. The IP addr

Re: Extracting request IP in Camel CXF

2010-12-23 Thread goels...@yahoo.com
That was sort of helpful Ashwin, thanks. Your long answer did get me to explore the world of interceptors, but I am sorry to report that I still don't see the remote IP address. Here's what I did: 1) Create interceptors. I tried PRE_STREAM, but that didn't work so I just created two more, one ea

Re: Extracting request IP in Camel CXF

2010-12-22 Thread goels...@yahoo.com
I'm using camel-core-2.5.0 and camel-cxf-2.5.0 which AFAIK is the latest version. I was reading through another http://stackoverflow.com/questions/3480334/camel-cxfrs-with-custom-http-headers post on Stack Overflow where someone had trouble getting to custom headers. As per the post, that was a

Re: Extracting request IP in Camel CXF

2010-12-21 Thread goels...@yahoo.com
Thanks for the response Ashwin, but I am unable to find the "HTTP.REQUEST" header in the exchange object. My process() method is as follows: public void process (Exchange exchange) { Map headers = exchange.getIn().getHeaders(); // loop through the headers object above and print out all

Extracting request IP in Camel CXF

2010-12-16 Thread goels...@yahoo.com
Hi, When I used a standalone CXF web service, I used to be able to extract the remote IP address in my Impl class. CXF would inject a WebServiceContext object in my Impl class and I would have the class as follows: public class MyWSImpl implements IMyWS { @Resource private WebSe