[jboss-user] [JBossWS] - Re: How to retrieve client IP address?
julio.vitorino
do-not-reply at jboss.com
Mon Jul 31 13:50:25 EDT 2006
In you server side code, put the following code:
import org.apache.axis.MessageContext;
import org.apache.axis.Constants;
...
...
in your webservice method, put:
public void someMethod()
{
MessageContext context = MessageContext.getCurrentContext();
String callerIP = (String)context.getProperty(Constants.MC_REMOTE_ADDR);
system.out.println("CallerIP = " + callerIP);
// Your code goes here...
}
Bye,
Julio.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961961#3961961
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961961
More information about the jboss-user
mailing list