You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jim Talbut <jt...@spudsoft.co.uk> on 2012/07/13 10:58:34 UTC
Finding remote IP
Hi,
I want to be able to log the remote IP for all requests going through a
logging interceptor.
At the moment I'm getting the remote IP from message.get(
AbstractHTTPDestination.HTTP_REQUEST ).getRemoteAddr(), but that only
works for inbound requests.
I can see that I can't get the remote IP for outbound requests because
it isn't know at the time of the interceptor.
And for outbound responses I can just remember the value from the
inbound request.
But I can't see any way to get the remote IP from a message that is an
inbounded response (i.e. a received reply from a service).
Is there any way to get that or has it been irretrievably forgotten?
Thanks
Jim
Re: Finding remote IP
Posted by Daniel Kulp <dk...@apache.org>.
I'm not sure if it's even available, ever. Looking at the
HttpURLConnection, I don't see any method for it.
Dan
On Friday, July 13, 2012 09:58:34 AM Jim Talbut wrote:
> Hi,
>
> I want to be able to log the remote IP for all requests going through a
> logging interceptor.
>
> At the moment I'm getting the remote IP from message.get(
> AbstractHTTPDestination.HTTP_REQUEST ).getRemoteAddr(), but that only
> works for inbound requests.
> I can see that I can't get the remote IP for outbound requests because
> it isn't know at the time of the interceptor.
> And for outbound responses I can just remember the value from the
> inbound request.
> But I can't see any way to get the remote IP from a message that is an
> inbounded response (i.e. a received reply from a service).
> Is there any way to get that or has it been irretrievably forgotten?
>
> Thanks
>
> Jim
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com