aspose file tools*
The moose likes Web Services and the fly likes client's ip in web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "client Watch "client New topic
Author

client's ip in web service

Santi Zaba
Greenhorn

Joined: Oct 20, 2008
Posts: 2
hello!

I'm using the web server that comes with the jdk 6 to create a web service, the problem is that i don't know how to obtain the ip from the application calling the method in the web service. Any ideas?

I've seen how to do it using tomcat and getting the httpservletrequest but i must do it using the server from the jdk.

please help me!
____________
Best Regards,
Santi
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41884
    
  63
Welcome to JavaRanch.

That sounds like a case for message handlers. The MessageContext interface (used in both logical handlers and SOAP handlers) provides access to the servlet request and response.

By the way, is "Ago" really your last name? We have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. if yours does not conform with it, then please take a moment to change it, which you can do right here.


Ping & DNS - my free Android networking tools app
Santi Zaba
Greenhorn

Joined: Oct 20, 2008
Posts: 2
Originally posted by Ulf Dittmer:
Welcome to JavaRanch.

That sounds like a case for message handlers. The MessageContext interface (used in both logical handlers and SOAP handlers) provides access to the servlet request and response.



Thanks for answering.

the problem with that is that the jdk 6 does not have the javax.servlet package so i can not do anything using servlets, or at least i don't know how.

____________
Best Regards,
Santi
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41884
    
  63
The JDK 6 web server may not be a servlet container in general, but it's nonetheless possible that it handles web service requests through the Servlet API. That's pure speculation on my part, but worth a try, I think.
 
Don't get me started about those stupid light bulbs.
 
subject: client's ip in web service