-
1. Re: Hold the client ip from the client calls made to the we
adinarayana.gunnam Nov 1, 2007 3:30 AM (in response to adinarayana.gunnam)Hi
I got the solution for this problem.
I got the implementation class for the WebServiceContextImpl class.I hope this it is not been implemented in jars provided.
I found a method to get the messagecontext.
i.e
public MessageContext getMessageContext()
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if(msgContext instanceof SOAPMessageContextJAXWS)
return (SOAPMessageContextJAXWS) msgContext;
else
return new SOAPMessageContextJAXWS(msgContext);
}
plesae import the jar C:\JBOSS\server\all\deploy\jbossws.sar\jbossws- core to get all the classesequired for this method
I used the obtained message context from this method to obtain the ip addtress as below
MessageContext mc=getMessageContext();
System.out.println(((javax.servlet.ServletRequest)mc.get(MessageContext.SERVLET_REQUEST)).getRemoteAddr());
Thanks
Adinarayana