Overload Demo  Locate

Overview  Locate

This demo shows how overloading for Java methods is supported.

The service used here has three methods with identical names but different parameter types. The three methods each return a string which contains the method that was called and a "result" (not important for this demo but it is the number given in the parameter, increased by 10).

The Result strings look like the following:

"Called method with String parameter - result is: ..."
"Called method with int parameter - result is: ..."
"Sent Struct: Called method with Struct parameter - result is: ..."

Demo Package Description  Locate

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

File or directoryDescription
src/demo/advanced/overload/server/

Server source code

src/demo/advanced/overload/client/

Client source code

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.

The demo can be run in two different ways:

Runtime Publishing  Locate

To use Runtime Publishing, follow these steps:

  1. Be sure that you have not started SESJ.

  2. Compile the server classes.

    Windows: run.bat make_server
    Linux:   ./run.sh make_server
    
  3. Run OverloadServer (it starts SESJ and publishes OverloadService class).

    Windows: run.bat run_server
    Linux:   ./run.sh run_server (use a new terminal)
    

    You can look at OverloadService WSDL on 'http://localhost:6060/demo/advanced/OverloadService/wsdl' from your browser.

  4. Make the client classes.

    Windows: run.bat make_client
    Linux:   ./run.sh make_client
    
  5. Run OverloadClient (it calls OverloadService).

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

    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.

Persistent Deployment  Locate

To run using Persistent Deployment:

  1. Be sure that you've started SESJ.

  2. Compile OverloadService.

    Windows: run.bat make_service
    Linux:   ./run.sh make_service
    
  3. Deploy OverloadService on the SESJ.

    Windows: run.bat deploy_service
    Linux:   ./run.sh deploy_service
    
  4. Make the client classes.

    Windows: ./run.bat make_client
    Linux:   ./run.sh make_client
    
  5. Run OverloadClient (it calls OverloadService).

    Windows: ./run.bat run_client
    Linux:   ./run.sh run_client
    
  6. Undeploy OverloadService from the SESJ.

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