Chapter 36. Implementing a WS Client
36.1. WS Client Overview
jaxws:clientelement in Spring XML.
Service Endpoint Interface (SEI)
WS client proxy
The CustomerService client
customer-ws-clientdemonstration, which is available from the following location:
Figure 36.1. Building a WS Client
Implementing and building the WS client
- Obtain a copy of the WSDL contract.
- Generate the Java stub code from the WSDL contract using a WSDL-to-Java converter,
ws2java. This gives you the SEI,
CustomerService, and its related classes, such as
- Implement the main client class,
ClientInvoker, which invokes the Web service operations. In this class define a bean property of type,
CustomerService, so that the client class can receive a reference to the WS client proxy by property injection.
- In a Spring XML file, instantiate the WS client proxy and inject it into the main client class,