O'Reilly logo

Java Web Services in a Nutshell by Kim Topley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. WSDL

In Chapter 2, you saw how simple it is to create a web service using JAX-RPC by starting with a service definition in the form of a Java interface. Given such definitions and a configuration file, the wscompile and wsdeploy utilities can generate the Java code necessary to link both the client and server implementations to the underlying JAX-RPC infrastructure that ultimately creates or consumes SOAP messages. Although this is convenient for Java developers, it is not really acceptable to describe web services—which are supposed to be platform- and language-independent—using the type definition system of a programming language. The JAX-RPC book service created in Chapter 2, for example, uses a command-line client written in Java. In the real world, the client might instead need to be written in VB.NET, C#, or C++, or somebody might want to take the service definition and create an alternative server-side implementation on a different platform, such as Microsoft’s .NET. In both of these cases, having the service defined in terms of Java interfaces is not particularly helpful.

The Web Service Description Language (WSDL) is an XML vocabulary that can be used to describe web services in both a platform- and programming language-neutral fashion. Web services defined by WSDL documents are published in a registry. Programmers can then either create their own implementations of these services, or develop clients to consume them by obtaining the WSDL definition and interpreting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required