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 "Pasula, Venugopal (Consultant)" <Ve...@GTECH.COM> on 2005/09/01 16:25:33 UTC
RE: WebService Deployment Programmatically
Hi Dinu,
I had this same issue, but I resolved that by doing this task in separate thread by giving some delay(till the server started). I This You can deploy the webservice only after the server has started. please let me know if you have already found the better solution.
Thanks, Venu
-----Original Message-----
From: Daniel (EXT), Dinu [mailto:x_danie@ugs.com]
Sent: Tuesday, August 30, 2005 8:56 AM
To: axis-dev@ws.apache.org
Subject: 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 <http://localhost:9999/%20Testapp/%20TCEntIntegrationServlet> ://localhost:9999/ Testapp/ TCEntIntegrationServlet the above code executes fine and the webservice gets deployed properyly.
Could you please advice on this issue
Thanks In Advance,
Dinu
-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data corruption,
interception, tampering, unauthorized amendment and viruses. We only
send and receive emails on the basis that we are not liable for any
such corruption, interception, tampering, amendment or viruses or any
consequence thereof.
Re: WebService Deployment Programmatically
Posted by Davanum Srinivas <da...@gmail.com>.
Guys,
just run "java org.apache.axis.utils.Admin -server deploy.wsdd" on the
command line. This will create a server-config.wsdd. drop that into
your WAR under WEB-INF and you are all set!!!
-- dims
On 9/1/05, Pasula, Venugopal (Consultant) <Ve...@gtech.com> wrote:
>
> Hi Dinu,
> I had this same issue, but I resolved that by doing this task in
> separate thread by giving some delay(till the server started). I This You
> can deploy the webservice only after the server has started. please let me
> know if you have already found the better solution.
>
> Thanks, Venu
>
> -----Original Message-----
> From: Daniel (EXT), Dinu [mailto:x_danie@ugs.com]
> Sent: Tuesday, August 30, 2005 8:56 AM
> To: axis-dev@ws.apache.org
> Subject: 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 the above code executes fine and the webservice
> gets deployed properyly.
>
>
>
> Could you please advice on this issue
>
>
>
> Thanks In Advance,
>
> Dinu
>
> ________________________________
>
>
>
>
> This email may contain confidential and privileged material for the
> sole use of the intended recipient(s). Any review, use, retention,
> distribution or disclosure by others is strictly prohibited. If you are
> not the intended recipient (or authorized to receive for the
> recipient), please contact the sender by reply email and delete all
> copies of this message. Also, email is susceptible to data corruption,
> interception, tampering, unauthorized amendment and viruses. We only
> send and receive emails on the basis that we are not liable for any
> such corruption, interception, tampering, amendment or viruses or any
> consequence thereof.
--
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform