You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Daniel (EXT), Dinu" <x_...@ugs.com> on 2005/08/30 14:56:09 UTC

WebService Deployment Programmatically

Hi,

 

I would like to deploy my webservice programmatically when the
Web/Appserver gets started. This I do in the init() method of my servlet
(TCEntIntegrationServlet). I have added all the axis libraries (jars) in
my web application's (Testapp\WEB-INF\lib) lib folder. In
Testapp\WEB-INF\ folder I have placed the axis's server-config.wsdd. 

 

The wsdd file (Testapp )is placed in Testapp\ folder

 

Attached are the entries I have made in my Testapp\WEB-INF\lib\web.xml.
Invoking the servlets sequentially via <load-onstartup> tags

 

In my TCEntIntegrationServlet::init()

{

 AdminClient ac = new AdminClient();

            

 String [] deployargs = new String[3];

            

 deployargs [0] = "-l" ;

 deployargs [1] = "http://localhost:9999/
Testapp/services/AdminService";       

 deployargs [2] = getServletContext().getRealPath("deploy.wsdd");

      

 try

 {

   // Deploy the Service

   ac.process(deployargs);                

 } 

 catch (Exception e) 

 {

      e.printStackTrace();

 }

}

Am getting the error attached after ac.process(deployargs); is executed.
It seems the AxisEngine (& AdminServices) is not initialized
successfully when the thread comes to my servlet's init() method. Is
there any way to overcome this

 

If I put the same code in a doget() method in the above Servlet class
and invoke the servlet via http://localhost:9999/ Testapp/
TCEntIntegrationServlet
<http://localhost:9999/%20Testapp/%20TCEntIntegrationServlet>   the
above code executes fine and the webservice gets deployed properyly.

 

 Could you please advice on this issue

 

Thanks In Advance,

Dinu