Compiling and running the Java sample SOAP client

This client uses the spheon-jsoap library (version 0.5.0), which can be obtained from [external link] http://sourceforge.net/projects/spheon-jsoap/

This sample contains the parts of the library you need. See the link above if you wish to obtain the jsoap documentation.

This sample is built using the JDK that is shipped with M-Business Server version 7.0. The instructions below are specific for a Windows system.

Note

The <M-Business_Home> directory referred to in the steps below is the M-Business home directory that is created under the location that you specify during installation. For more information, see The M-Business home directory.

To compile and run the Java sample SOAP client
  1. Make sure M-Business SOAP Server is running on the default port 8093, and vending WSDL on the default port 8094.

  2. In the <M-Business_Home>/samples/java/ directory, copy the appropriate file below to overwrite Makefile.

    • On Windows, copy Makefile.win32.

    • On UNIX, copy Makefile.unix.

  3. Open a command prompt and change directories to the location of the Main.java file:

    cd <M-Business_Home>/samples/java

  4. At the same command prompt, enter the following command to compile the Java sample SOAP client:

    make

    Now you are ready to run tests against M-Business SOAP Server.

  5. Enter the following command:

    make test

    This executes the following command to test the M-Business SOAP Server connection:

    ../../jdk/bin/java -classpath "lib/spheon-jsoap.jar:lib/spheon-jsoap-tools.jar:lib/jdom.jar:lib/xalan.jar:lib/xml-apis.jar:lib/xercesImpl.jar:." Main http://localhost:8093/agsoap admin "" "select now()"