• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

client's ip in web service

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic