Capture Request IP in Web Service

Hi, Please let me know if we can able to capture the request IP inside web methods?I am aware we can able to do this in Servlet request using HttpServletRequest.getRemoteAddr()Is there is something similar to this in web service?Thanks for your time.
[298 byte] By [Veeramania] at [2007-11-26 19:52:57]
# 1

To undersatnd better,

a) can you give your skelton code .How you are written the web methods.

b) Are you deploying your application in Weblogic server?

we can get the HTTPServletRequest from any web service method using the following code:

SOAPMessageContext soapMessageContext =

WebServiceContext.currentContext().getLastMessageContext();

ServletRequestImpl sri = (ServletRequestImpl)soapMessageContext.getProperty("weblogic.webservice.transport.http.request");

soapMessageContext is the messageContext returning by the SOAPServlet. For each request from the client this soapmesageContext will be changed.

To get the HTTPServletRequest , need to get property of weblogic.webservice.transport.http.request.

Regards

Nitesh

niteshDa at 2007-7-9 22:44:12 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...