wasptocpp.BarnService Demo  Locate

Overview  Locate

This demo calls SESJ C++ server, be sure you have installed SESJ for C++ and C++ server is running. Take a look at demo/interop/java in C++ distribution.

This demo shows the interoperability between WSO2 SOA Enablement Server for Java and SESJ for C++, where the client side is developed in WSO2 SOA Enablement Server for Java and the server side in SESJ for C++. Reverse interoperability is demonstrated in the cpptowasp.BarnService demo.

Demo Package Description  Locate

In addition to the files described in Files and Directories, this demo contains:

File or directoryDescription
src/demo/interop/wasptocpp/barn/client/

Client source code

Pattern, Class, and Code Discussion  Locate

BarnService is a simple service which exposes some (not all) basic processes of barn. We can find out the barn rating, which indicates barn quality - which cows are suitable for slaughter, etc.

Client application steps:

  • Show current rating of barn.

  • Show information about cows in barn and show mean milk yield and instantaneous milk yield.

  • Which cow is the best one?

  • Show which cows are suitable for slaughter.

  • Cows slaughtered.

  • Barn rating after slaughter.

Building and Running Demos  Locate

You can run the demo using the "run.sh" (for UNIX) or "run.bat" (for Windows) scripts. Running the script without arguments prints out a help message on screen.

Running the Client  Locate

  1. Be sure that you have not started SESJ.

  2. Make the client classes.

    Windows: run.bat make_client http://localhost:6070/Interop/Java
    Linux:   ./run.sh make_client http://localhost:6070/Interop/Java
    

    The parameter "http://localhost:6070/Interop/Java" indicates URL where to GET WSDL from.

  3. Run BarnClient (it calls BarnService).

    Windows: run.bat run_client
    Linux:   ./run.sh run_client
    

    This will use BarnService at http://localhost:6070/Interop/Java.

  4. To specify a custom location "http://real_hostname:8080/Interop/Java", use:

    Windows: run.bat run_client http://real_hostname:8080/Interop/Java
    Linux:   ./run.sh run_client http://real_hostname:8080/Interop/Java
    

    If you wish to follow the progress of the invocation with SoapSpy, perform the following:

    1. Run server_java60/bin/soapspy.bat or soapspy.sh. This will bring up the SoapSpy GUI.

    2. Start spying by selecting Start Spying from the Spy menu or by clicking the spy icon in the main pane.

    3. Run the client using the run spy_client command instead of run_client.