6.2.2 Creating the Client Stub
You can create a client stub using any standard SOAP implementation that conforms to the JAXWS standard. The recommended implementation is Metro, developed by the GlassFish group.
To create a Java client stub for a web service using Metro, follow the steps below:
1. Make sure the web service is deployed and running on the host server.
2. Create the client java stubs:
a. Download and set-up Metro (http://metro.java.net).
b. Create a new folder where the stub files will be create (e.g., {StubHome}).
c. Create two folders in {StubHome}, e.g., classes and source, or any other suitable names.
d. Use the {MetroHome}/bin/wsimport utility to create the stubs with the following command:
wsimport.bat -s {folder1} -c {folder2} -Xendorsed {URL}?wsdl
e.g., change directory to {StubHome}
{MetroHome}/bin/wsimport.bat -s source -c classes -Xendorsed http://localhost:8080/sree/PeopleService?wsdl
This will create the Java stub files in the classes folder and source code (optional) in the source folder.
| << 6.2.1 Defining a Web Service Data Source | © 1996-2013 InetSoft Technology Corporation (v11.4) | 6.3 Text Data Source >> |