This demo shows how messaging may be done when the operation in the WSDL contains an input section only. This is also known as one-way messaging. Java2WSDL supports one-way operations with the '--one-way' option.
One-way messages can be used in situations where a reply cannot be delivered.
Sometimes, there is no need for a reply. In these cases using one-way messages can spare the network bandwidth and speed up the processing.
In addition to the files described in Files and Directories, this demo contains:
File or directory | Description |
---|---|
src/demo/basic/one-way/server/ | Server source code |
src/demo/basic/one-way/client/ | Client source code |
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 OneWayServer (it starts SESJ and publishes OneWayService class).
Windows: run.bat run_server Linux: ./run.sh run_server (use a new terminal)
You can look at OneWayService WSDL on 'http://localhost:6060/demo/basic/OneWayService/wsdl' from your browser.
Make the client classes.
Windows: run.bat make_client Linux: ./run.sh make_client
Run OneWayClient (it calls OneWayService).
Windows: run.bat run_client Linux: ./run.sh run_client
To run using Persistent Deployment:
Be sure that you've started SESJ.
Compile OneWayService.
Windows: run.bat make_service Linux: ./run.sh make_service
Deploy OneWayService on the SESJ.
Windows: run.bat deploy_service Linux: ./run.sh deploy_service
Make the client classes.
Windows: ./run.bat make_client Linux: ./run.sh make_client
Run OneWayClient (it calls OneWayService).
Windows: run.bat run_client Linux: ./run.sh run_client
Undeploy OneWayService from the SESJ.
Windows: run.bat undeploy_service Linux: ./run.sh undeploy_service