Hi Ted,
override init(Object context) method of javax.xml.rpc.server.ServiceLifecycle, initializing ServletEndpointContext and then you are able to retrieve the HttpServletRequest.

I made in this way:
public void init(Object context) throws ServiceException {
       try {
           this.context = (ServletEndpointContext) context;
       } catch (Exception e) {
log.log(Level.SEVERE, "error initializing ServletEndpointContext", e);
           this.context = null;
       }
   }

and then in the methods i can made
HttpServletRequest req = (HttpServletRequest) context.getMessageContext().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
String ipAddr = req.getRemoteAddr();


Ted Roeloffzen ha scritto:
Hello all,
I have a webservice written in Axis and now i have to retrieve the ip-address of the pc/server sending me a request.
How do i do that?
Greetings, Ted



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to