You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nguyen Tuan Anh <an...@gmail.com> on 2005/04/19 18:51:51 UTC
init function in axis
Hi,
can anyone tell me how to write a function like init() in servlet for
soap server in axis?
thanks,
RE: init function in axis
Posted by Justin Echternach <ju...@hescorp.com>.
Hi Nguyen,
Here is a sample of how to do what you want ...
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.rpc.server.ServletEndpointContext;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServlet;
import javax.xml.rpc.ServiceException;
public class ExampleClass implements ServiceLifecycle {
public void init(Object arg0) throws ServiceException {
ServletEndpointContext sec = (ServletEndpointContext)arg0;
context = sec.getServletContext();
servlet =
(HttpServlet)sec.getMessageContext().getProperty(HTTPConstants.MC_HTTP_SERVL
ET);
}
}
Hope this helps.
Best Regards,
Justin
-----Original Message-----
From: Nguyen Tuan Anh [mailto:anhnt1@gmail.com]
Sent: Tuesday, April 19, 2005 12:52 PM
To: axis-user@ws.apache.org
Subject: init function in axis
Hi,
can anyone tell me how to write a function like init() in servlet for
soap server in axis?
thanks,