aspose file tools*
The moose likes Web Services and the fly likes How to get remote IP address in JAX-WS? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to get remote IP address in JAX-WS?" Watch "How to get remote IP address in JAX-WS?" New topic
Author

How to get remote IP address in JAX-WS?

Sreenivasula Rayavaram
Greenhorn

Joined: Oct 06, 2006
Posts: 2
Hi,

I need to get remote IP(caller IP address) in JAX-WS to track the incoming client for audit perpose. I have web service and that are with JAX-WS standereds. I think i can get using JAX-WS handlers. can some one point to me any examples or provide me any links whick talks about this.

Thanks for you help.

-Seenu


Thanks,<br />Seenu<br />SCJP/SCBCD/Clear Case
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2906
Welcome to Javaranch

A little bit about Message Context in JAX-WS

From the javax.xml.ws.handler.MessageContext get the "SERVLET_REQUEST" property (javax.servlet.http.HttpServletRequest) and then use the getRemoteAddr() method on it.

Getting the Client's Address in a Servlet


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
Sreenivasula Rayavaram
Greenhorn

Joined: Oct 06, 2006
Posts: 2
Thanks Peer Reynders. Still i am in design phase of the project and didn't time to experiment. i read the article and understood how it works.

Thanks for your time.

-Seenu
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to get remote IP address in JAX-WS?
 
Similar Threads
How do I get remote IP Address in My JAX-RPC Handler ?
Tracking Remote Public IP address
how to get IP address in linux
Finding the IP Address of Remote Machines if any connected to my Current machine
api to remote internet IP and local IP address of my computer