• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

client's ip in web service

 
Santi Zaba
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Santi Zaba
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic