This demo shows how to deploy and access web services implemented by EJBs.
The demo includes a regular SESJ Web service client. We assume that you have deployed SESJ and the EJBs into some application server and ensured that the EJBs are accessible to SESJ. For many of the most commonly used application servers, you can do this with the script 'WASP_HOME/demos/advanced/j2eeIntegration/deployWithEJBs.' The script creates an enterprise application containing SESJ and EJBs and modifies the environment of your SESJ installation so that the URLs of demos point to the deployed SESJ. Also properties and classpaths are set so that JMS transport is able to find administered objects and demo clients are able to communicate with the deployed SESJ by SOAP messaging over JMS.
![]() | Note |
---|---|
To use JMS transport, you must have WSO2 SOA Enablement Server for Java integrated and configured with a JMS provider. |
You can find sources of EJBs used by this demo in the directory 'WASP_HOME/demo/advanced/j2eeIntegration/jndiOverSoap/src'
In addition to the files described in Files and Directories, this demo contains:
File or directory | Description |
---|---|
src/demo/advanced/ejbWebservice | SESJ Web service client sources |
This demo assumes that you have deployed SESJ and EJBs into an application server and the EJBs can be found in the SESJ context. URLs in all env.bat scripts must be changed to match your deployment.
You can run the demo using "run.sh" or "run.bat" scripts. The script on invocation without arguments prints out a help message.
The following steps are for running the demo via scripts:
Deploy the web services implemented by EJBs on the SESJ ...
Windows: run.bat deploy_service Linux: ./run.sh deploy_service
Compile client and EJBs classes ...
Windows: run.bat make_client Linux: ./run.sh make_client
Run the SESJ Web service client (it calls web services implemented by EJBs)
Windows: run.bat run_client Linux: ./run.sh run_client
Undeploy the web services implemented by EJBs from the SESJ ...
Windows: run.bat undeploy_service Linux: ./run.sh undeploy_service
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.