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 Jay Burgess <li...@vtgroup.com> on 2006/01/26 00:03:40 UTC
Deploying a web service
I must be missing something obvious, but even after checking the list archives,
etc., I still can't seem to get this to work. Here's my situation:
I have an existing webapp being deployed to Tomcat 5.0.19 as a .WAR. I'm trying
to add a test web service to it (the Math sample delivered with Axis 1.3). At
this point, I've done the following:
(1) Added the Axis servlet to my app's web.xml:
<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
(2) Mapped web service requests to the servlet:
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/wsapi/*</url-pattern>
</servlet-mapping>
(3) Updated my build.xml to use <axis-java2wsdl> and <axis-wsdl2java> to
generate what I think are all the correct files into my .WAR: Add.class,
Add.java, Add.wsdl, AddService.java, AddServiceLocator.java,
AddSoapBindingImpl.java, AddSoapBindingStub.java, deploy.wsdd, undeploy.wsdd.
(4) Included all the required .JARs in Tomcat/common/lib and my webapp's
WEB-INF/lib directory.
The AxisServlet seems to be running, but when I try to hit
"http://localhost/mywebapp/wsapi/Add", I get back:
AXIS error
No service is available at this URL
I feel like my webapp hasn't really "deployed" the web service, but I'm not sure
what I need to to to make that happen automatically as part of my webapp's Ant
build/deploy process.
Do I still need to include the AdminServlet somehow? Obviously, my goal is to
put as little of Axis in my webapp as possible, and I thought I got that by
simply including the .JARs, but not happyaxis.jsp, etc.
Thanks in advance.
Jay
| Jay Burgess [Vertical Technology Group]
| http://www.vtgroup.com/
Re: Deploying a web service
Posted by Jim Azeltine <ja...@sbcglobal.net>.
I am somewhat of a noob myself, but I am starting to "get it". You need to look for "embedded+axis" when you are searching. I found a couple of references for you:
http://cephas.net/blog/2005/09/13/update_to_embedded_axis_application_in_tomcat.html
Here is the install guide on it:
http://ws.apache.org/axis/java/install.html#AdvancedInstallationAddingAxisToYourOwnWebapp
I think this line is pertinent for you:
Run the Axis AdminClient against your own webapp, instead of Axis, by changing the URL you invoke it with.
I am just curious, why do you need to add axis to your app instead of the opposite?
Jim
Jay Burgess <li...@vtgroup.com> wrote:
I must be missing something obvious, but even after checking the list archives,
etc., I still can't seem to get this to work. Here's my situation:
I have an existing webapp being deployed to Tomcat 5.0.19 as a .WAR. I'm trying
to add a test web service to it (the Math sample delivered with Axis 1.3). At
this point, I've done the following:
(1) Added the Axis servlet to my app's web.xml:
AxisServlet
Apache-Axis Servlet
org.apache.axis.transport.http.AxisServlet
(2) Mapped web service requests to the servlet:
AxisServlet
/wsapi/*
(3) Updated my build.xml to use and to
generate what I think are all the correct files into my .WAR: Add.class,
Add.java, Add.wsdl, AddService.java, AddServiceLocator.java,
AddSoapBindingImpl.java, AddSoapBindingStub.java, deploy.wsdd, undeploy.wsdd.
(4) Included all the required .JARs in Tomcat/common/lib and my webapp's
WEB-INF/lib directory.
The AxisServlet seems to be running, but when I try to hit
"http://localhost/mywebapp/wsapi/Add", I get back:
AXIS error
No service is available at this URL
I feel like my webapp hasn't really "deployed" the web service, but I'm not sure
what I need to to to make that happen automatically as part of my webapp's Ant
build/deploy process.
Do I still need to include the AdminServlet somehow? Obviously, my goal is to
put as little of Axis in my webapp as possible, and I thought I got that by
simply including the .JARs, but not happyaxis.jsp, etc.
Thanks in advance.
Jay
| Jay Burgess [Vertical Technology Group]
| http://www.vtgroup.com/