This demo shows the Hello World service using SOAP 1.2 to communicate (instead of SOAP 1.1).
To use SOAP 1.2.
In addition to the files described in Files and Directories, this demo contains:
File or directory | Description |
---|---|
src/demo/basic/hello12/server/ | Server source code |
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:
basic/hello
basic/dynamic
advanced/async/hello
advanced/async/dynamic
How to use the clients from these demos is described in the following paragraphs.
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:
To use Runtime Publishing, follow these steps:
Be sure that you have not started SESJ.
Compile the server classes.
Windows: run.bat make_server Linux: ./run.sh make_server
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.
Make the client classes.
Choose which client you would like to use and go to that demo directory:
basic/hello
basic/dynamic
advanced/async/hello
advanced/async/dynamic
Windows: run.bat make_client Linux: ./run.sh make_client
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:
Run server_java60/bin/soapspy.bat or soapspy.sh. This will bring up the SoapSpy GUI.
Start spying by selecting Start Spying from the Spy menu or by clicking the spy icon in the main pane.
Run the client using the run spy_client command instead of run_client.
To run using Persistent Deployment:
Be sure that you've started SESJ.
Compile the HelloService class.
Windows: run.bat make_service Linux: ./run.sh make_service
Deploy HelloService on the SESJ.
Windows: run.bat deploy_service Linux: ./run.sh deploy_service
Make the client classes.
Choose which client you would like to use and go to that demo directory:
basic/hello
basic/dynamic
advanced/async/hello
advanced/async/dynamic
Windows: run.bat make_client Linux: ./run.sh make_client
Run HelloClient (it calls HelloService).
Windows: run.bat run_client Linux: ./run.sh run_client
Undeploy HelloService from the SESJ.
Windows: run.bat undeploy_service Linux: ./run.sh undeploy_service