Hello World Demo Using SOAP 1.2  Locate

Overview  Locate

This demo shows the Hello World service using SOAP 1.2 to communicate (instead of SOAP 1.1).

What You Will Learn  Locate

To use SOAP 1.2.

Demo Package Description  Locate

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

File or directoryDescription
src/demo/basic/hello12/server/

Server source code

Pattern, Class, and Code Discussion  Locate

The service from the 'Hello World Demo' (in directory demo/hello) is published with a WSDL document that contains only a SOAP 1.2 port (and binding). It implies that SESJ's clients will use the SOAP 1.2 protocol to communicate with the newly published service.

The 'Hello World' service is published on the same endpoint ("/demo/basic/HelloService") as is the 'Hello Wold Demo' (in directory demo/hello).

Because the support of SOAP protocols is transparent in SESJ you can use any 'Hello, world!' client to use this service.

Clients from the following demos can be used to invoke the hello(String message) operation of this service:

  1. basic/hello

  2. basic/dynamic

  3. advanced/async/hello

  4. advanced/async/dynamic

How to use the clients from these demos is described in the following paragraphs.

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 the Hello12Server class (it starts SESJ and publishes HelloService).

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

    You can look at the HelloService WSDL on 'http://localhost:6060/demo/basic/HelloService/wsdl' from your browser.

  4. Make the client classes.

    Choose which client you would like to use and go to that demo directory:

    1. basic/hello

    2. basic/dynamic

    3. advanced/async/hello

    4. advanced/async/dynamic

    Windows: run.bat make_client
    Linux:   ./run.sh make_client
    
  5. Run HelloClient (it calls HelloService).

    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 the HelloService class.

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

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

    Choose which client you would like to use and go to that demo directory:

    1. basic/hello

    2. basic/dynamic

    3. advanced/async/hello

    4. advanced/async/dynamic

    Windows: run.bat make_client
    Linux:	./run.sh make_client
    
  5. Run HelloClient (it calls HelloService).

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

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