axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eran Chinthaka <chinth...@opensource.lk>
Subject Re: [Axis2] missing features when converting from Axis1 to Axis2
Date Fri, 11 Aug 2006 18:28:15 GMT
Implement org.apache.axis2.Service interface to your service implementation.

init method will be called when your service gets deployed.

setOperationContext method will be called, whenever your service is
invoked, by which you can access the config context.

-- Chinthaka

Johan Lundberg wrote:
> two questions:
> 
> 1.
> Is there any way to get a signal when axis2 deploys my web service? In
> axis1, my app was part of the web app and I could do the following:
> 
> /** receiving Signal when web application starts **/
> 
> public class InfoHandler implements ServletContextListener
> {
>    public void contextInitialized(ServletContextEvent sce)
>    {
> 
>    ....
>    ....
>        this.timer.schedule(new ScheduledAction(sce), 0, 600000); // 10
> minutes
>      }
> }
> 
> 2.
> Is there any way to get the ConfigurationContext from my web service
> app? I need it in order to get the "real path" before writing a file in
> the web container.
> 
> /*** Getting the real path ***/
> 
> Axis1 specific way of getting servletcontext
> HttpServlet srv = (HttpServlet)
> MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET);
> 
> this.srvCtx = srv.getServletContext();
> String path = this.srvCtx.getRealPath("/");
> 
> 
> Any advice is welcome.
> /johan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 



Mime
View raw message