Chapter 6. Advanced JAX-RPC

Chapter 2 introduced the concepts behind JAX-RPC and demonstrated how to create simple JAX-RPC applications starting with a service endpoint defined in the form of a Java interface. This chapter builds on the discussion of SOAP messaging in Chapter 3 and of WSDL in Chapter 5 to show you how to do much more with JAX-RPC. This is quite a long chapter, which introduces many features of the JAX-RPC API and the wscompile and wsdeploy utilities that were not covered in Chapter 2. While reading this chapter, you will probably find it useful to refer to the detailed API coverage in the reference section of this book and to Chapter 8, which contains more information on the command-line tools and their associated configuration files.

Using WSDL with JAX-RPC

The book web service example that was used in Chapter 2 demonstrates how to create a web service client application when you have access to a description of the service interface in the form of a Java interface definition. Although this approach is convenient, it is unlikely that you will be able to use it when writing a client for a third-party web service. Web services are not always implemented in Java and, even for those that are, the public definition of the service interface is almost always provided in the form of a WSDL document rather than Java class files.

One way to create a web service client from a WSDL file is to start by pointing the wscompile tool at the WSDL document. To do this, you change the ...

Get Java Web Services in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.