I think those steps are pretty much what you need to do. If you're adding to an existing web application, then the web.xml file will need to be modified to declare the Axis servlet and the mapping for it. Basically, you'd need to merge whatever a stand-alone Axis web application needs, into your existing web application.
On the second point, one approach we've used is to provide a servlet mapping for retrieving WSDLs. So we don't use the "?wsdl" approach, but provide a specific URL, which causes a servlet to be invoked. All our WSDLs use a service location of something like "http://localhost:nnnn/axis/services/MyService". The servlet used to retrieve WSDLs, then modifies the WSDL to change the location to the host serving the service (the same host as the WSDL retrieval servlet).
Tony
Hello all.
Please excuse the nubie question, but then, where else would I ask it?
;-)
I'm investigating how I would add a web service to a currently existing
web application. Within this web app, I have an API containing my data
structures and the actions / commands that can be performed on them. As
a guide, I am following this document from Dion Almaer:
http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html.
>From Dion's guide, I believe that the appropriate steps are:
1.) generate the WSDL containing the XML statement of my data structure
and commands by using the java2WSDL tool.
2.) generate the server-side wrapping code (I'm not interested in
generating client-side code - that's up to my customer) by using the
wsdl2java tool.
3.) fill in the wrapper code generated from step 2, by redirecting the
methods to my API.
4.) compile all API and wrapper code, and then bundle up (war, etc)
5.) deploy web application (and web service) code to web container
(tomcat)
6.) deploy web service (java AdminClient deploy.wsdd)
First question: is this summary correct? Is there anything I'm
missing, or is there an easier way to do it?
Now, let me setup for my second question. I don't know the address /
URL / URN of the web service until deployment time. Basically, I'm
creating a web application and service combination, and then giving it
to a customer. He's then going to deploy it to a server of his
choosing. The problem that I have is that the java2wsdl tool in step 1
requires the destination address of the service, but I don't know it.
Second question: how can I create a web service and web application
combination without knowledge of the destination application? Does this
mean I'd have to generate the deploy.wsdd by hand? I have a rather
mature (read complicated and large) data structure. How would I include
the necessary java object to xml mapping in the deploy.wsdd? Would
XDoclet be able to generate the deploy.wsdd for me?
Thanks.
--
Jay Glanville
- incorporating a web service into a web app without serv... Glanville, Jay
- How to get the int returned from the service Dacheng
- RE: How to get the int returned from the servi... Greg Michalopoulos
- RE: incorporating a web service into a web app wit... tony . q . weddle
- RE: incorporating a web service into a web app wit... Jay Glanville
- RE: incorporating a web service into a web app... tony . q . weddle
- RE: incorporating a web service into a web app wit... Jay Glanville