java webservice 获取传入IP

axis.jar    servlet.jar

MessageContext mMsgContext = MessageContext.getCurrentContext();
HttpServletRequest mRequest =   (HttpServletRequest) mMsgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

String cClientIp = mRequest.getRemoteAddr();

posted on 2017-03-01 09:40  阿郎  阅读(286)  评论(0编辑  收藏  举报