4.2 Creating the SoapRepository Client
This section explains how to create a Java SOAP client for the SoapRepository service. The instructions below are appropriate for Metro 2.0, the default SOAP implementation.
Follow the steps below:
1. Make sure the SoapRepository service is deployed and running on the host server. For Metro, do this by entering the following URL:
http://machine:port/webapp/SoapRepository
(e.g., http://localhost:8080/sree/SoapRepository)
2. Create the client Java Stubs:
a. Download and configure Metro version 1.5 (http://metro.java.net).
b. Choose a folder where the Stub files will be created. (Preferably create a new one). We will refer to this folder as {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} -Xendorsed {URL}?wsdl
For example, change the working directory to {StubHome}/classes, and then enter the following command:
{MetroHome}/bin/wsimport.sh -s ../source -Xendorsed http://localhost:8080/sree/SoapRepository?wsdl
This will compile the Java stub files into the current directory and optionally save the source code in the 'source' folder.
Later, when you compile the client, the only resource you need on the classpath is this stub directory. For example:
set CLASSPATH={StubHome}\classes;.
| << 4.1.3 WebSphere | © 1996-2013 InetSoft Technology Corporation (v11.5) | 4.2.1 Example: Executing a Report >> |