In this section, we take a closer look at each of the WSDL elements.
To illustrate the discussion, we’ll use examples
from the WSDL document that describe the JAX-RPC book service that
you saw in Chapter 2. That particular web service
was developed by starting with Java interface definitions, rather
than from a WSDL file. If you already have a distributed application
written in Java (perhaps using RMI) that you need to convert to a web
service, this is the natural path to follow. However, in order to
make the service generally available, you must create and publish a
WSDL document. Fortunately, the
provided with the JAX-RPC reference implementation generates a WSDL
file from the information provided in its
jaxrpc-ri.xml file together with the class files
for the Java interfaces, thus saving you the trouble of trying to
build one manually.
As described in Chapter 2, the
wsdeploy utility creates the WSDL document for a
web service while constructing a deployable web archive from a
portable WAR file. If you just want to see what the WSDL document
corresponding to a Java interface definition looks like, you can use
wscompile utility to generate it without
having to first create a portable WAR file. See Chapter 8 for a description of how this can be done.
The WSDL file for the JAX-RPC
book service, which is called
can be found in the web archive at
chapter2\bookservice\Books.war relative to the installation directory for this book’s ...