This example takes you through the steps to develop a Web service client. The development process is based on the Web Services for Java 2 platform, Enterprise Edition (J2EE) and the Java API for XML-based remote procedure call (JAX-RPC) specification. For a Java or J2EE application to act as a client of a Web service, you must map the WSDL file to the Java code. The JAX-RPC specification defines the mapping between a WSDL file, Java code and XML Schema types.
Steps for this example task
You can obtain the WSDL document from the service provider by e-mail or by looking it up in a Universal Description, Discovery and Integration (UDDI) registry.
The WSDL2Java command-line tool is run against your WSDL file to develop client bindings.
The information needed to invoke the Web service in generated, including the Service Endpoint Interface and implementations; generated service interface; webservicesclient.xml, ibm-webservicesclient-bnd.xmi and ibm-webservicesclient-ext.xmi deployment descriptors.
See Chapter 4 of the JSR-109 specification. You can access the specification through Web services: Resources for learning.
Note: If an application creates a number of threads in the JSR-109 client, the meta data (including the WebSphere Application Server configuration) is not copied to the thread, and the Global Security Handler is not called.
You can also review the GetQuote client in the WebServicesSamples application available in the Samples Gallery.
Assemble the client JAR file into an EAR file or assemble the client WAR file into an EAR file.
Configure the webservicesclient.xml deployment descriptor.
Configure the ibm-webservicesclient-bnd.xmi deployment descriptor.
You should test the client to make sure it correctly operates and binds to the Web service.