I\'m trying to retrieve the client IP with JAX-WS, I used:
@Resource WebServiceContext wsContext; MessageContext mc = wsContext.getMessageContext(); HttpSe
The following code might work:
HttpServletRequest request = (HttpServletRequest) messageContext.get("transport.http.servletRequest"); String hostIp = request.getRemoteAddr();