This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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: 2922
    
    5
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get remote IP address in JAX-WS?