Hello All:
I would like to know how to get the Request from my implementation
class. I know how to get the ServletContext, but I want to get the
remote address of the client that requested my web service, it’s to say,
use request.getRemoteAddr(). My example is below:
public class HelloImpl implements HelloIF,ServiceLifecycle {
private ServletEndpointContext ctx;
public String message;
public void init(java.lang.Object context) {
ctx=(ServletEndpointContext)context;
messsage = ctx.getServletContext().getServerInfo();
}
public void destroy() {
}
public String sayHello(String s) {
return message + " : " + s;
}
Thanks