views:

802

answers:

2

Hey All,

I generated a Soap Service from a WSDL and now I need to deploy it to my existing application which uses embedded tomcat (I.E. I have a class which extends TomcatServeletContainer and a main class which instantiates that class and starts the server).

I see many examples for how to deploy an axis service to a standalone tomcat using a WAR, or a WSDD, but I don't see how to wire it together myself. I assume I have to define a servelet in the web.xml and provide some other glue. Any assistance or pointers to appropriate documentation would be most appreciated.

Thanks! -Carl

A: 

Yes, you will need build your application the same way you would for a WAR but programmatically inform tomcat where you exploded war lives.

Everything else should be the same as the standard servlet spec.

Eric Anderson
I see, this makes things a little more clear. I found the relevant documentation here I think:http://ws.apache.org/axis/java/install.htmlLook for "Advanced Installation", you can extend the AxisServlet class to implement your service, then copy the configuration for that class from web.xml but have it point to your class. Once I get it working, I will try to provide examples for posterity.
cmyers
Another great URL:<br/>http://www.ibm.com/developerworks/webservices/library/ws-deployjava.html<br/>Under the "Axis deployment on tomcat" section, it explains you can deploy using the "standard method", invoking adminclient, etc, then capture the service-config.wsdd file it generates and put it in your war (or deploy it to your running instance).<br/>I invoked the following command:java -cp <axis-cp> org.apache.axis.client.AdminClient -lhttp://host/axis/services/AdminService /path/to/deploy.wsdd<br/>Then took the generated server-config.wsdd and dropped it in my WEB-INF directory.
cmyers
+1  A: 

Have you been able to get this to work? I've been trying to build a webservice (in a standalone war-file containing the axis jars (w/dependencies)+server-config.wsdd) using maven. I really don't want to make any calls to the AdminClient at all (meaning not to install Axis).

I've generated the server side sources from a WSDL using the axistools-maven-plugin, and everything seems to work ok until I have deployed the service. http://localhost:8080/myApp/services gives me the name of the service and two exposed methods. But clicking the wsdl link displays an Axis error message telling me "Could not generate WSDL! There is no SOAP service at this location".

Is it at all possible to build a standalone Axis webservice this way using maven?

hnesse