users@jax-rpc.java.net

getting the request

From: Samuel Zarza <szarza_at_CESTEL.ES>
Date: Fri, 27 Sep 2002 12:17:13 +0200

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