EJB Web service Demo  Locate

Overview  Locate

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]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'

Demo Package Description  Locate

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

File or directoryDescription
src/demo/advanced/ejbWebservice

SESJ Web service client sources

Prerequisites and Preparatory Steps  Locate

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.

Building and Running Demos  Locate

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:

  1. Deploy the web services implemented by EJBs on the SESJ ...

    Windows: run.bat deploy_service
    Linux:   ./run.sh deploy_service
    
  2. Compile client and EJBs classes ...

    Windows: run.bat make_client
    Linux:   ./run.sh make_client
    
  3. Run the SESJ Web service client (it calls web services implemented by EJBs)

    Windows: run.bat run_client
    Linux:   ./run.sh run_client
    
  4. 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:

    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.