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 address is
actually stored in the "_endp" member of the Request object.
So, as per your suggestion, I added the following two lines at the beginning
of my handleMessage method in the interceptor
<code>
org.mortbay.jetty.Request jettyRequest =
(org.mortbay.jetty.Request)message.get("HTTP.REQUEST");
System.out.println("jettyRequest.getRemoteAddr(): " +
jettyRequest.getRemoteAddr());
</code>
and when I step into the getRemoteAddr() method of the Request object, I see
that _remoteAddr is null and therefore _endp.getRemoteAddr() is invoked.
It was just a matter of knowing exactly what stores the IP address and how
to extract it.
Thanks for your help.
Abhishek
--
View this message in context:
http://camel.465427.n5.nabble.com/Extracting-request-IP-in-Camel-CXF-tp3308148p3322673.html
Sent from the Camel - Users mailing list archive at Nabble.com.