Server side Implementation

The Server side implementation is based on generating EJB/Java class that is realized by the Service implementation Bean. Then a web service is generated to receive the SOAP request and sending the request to the EJB/Java Class. The EWS is a tool which will accept a WAR/JAR/EAR file as given by the Usage Scenario’s documentation and generated above explained Web Service and EJB.

Two cases are explaied below

JAR/WAR file, Java Class based implementation

  1. parse the webservice.xml file
  2. if wsdl file and jaxrpc mapping file does not exsits create them using the SEI
  3. generate axis skelton for axis using the "wsdl file"
  4. generate the wrapper webservice file
  5. generate the one jar file which has all information to deploy the service. (this is not done yet)

JAR/EAR file,EJB based implementation

  1. parse the webservice.xml file
  2. if wsdl file and jaxrpc mapping file does not exsits create them using the SEI
  3. generate axis skelton for axis using the "wsdl file"
  4. generate ejb remote/local and home interface files.
  5. generate the wrapper webservice file
  6. generate the container DD if required
  7. if the ejb-jar.xml file has security entry add security handler to axis wsdd file
  8. generate the one jar file which has all information to deploy the service.

This is how it looks like when the Wraper Web service is generated and deployed in the JAX-RPC runtime

Implemetation Bean invokation(EJB based case)

Architecture Diagram


Sequance Diagram

  1. The WS client will send the SOAP request to axis.
  2. Axis will parse the SOAP request.
  3. Axis will call the request message handlers associated with the web service. (they will take care of the security and transaction mapping of the WS).
  4. Axis will create the wrapper ws instance. (At this point the axis will call the Geronimo and get a reference to the serviceImplBean of ejb. This may be serviceImplBean itself or a indirect reference.) This will most likely to be taken from a Bean pool.
  5. When the webserive method is called in the wrapper Ws the corresponding method in the reference to the service Impl bean will be called.
  6. If result exists it will be given to the axis.
  7. Axis will call the response handlers associated with the WS.
  8. The result is marshaled and sent to the Client as SOAP.

Class Diagram

The tool will generate dummy Remote(Local) interface and dummy Home(LocalHome) interface. they are for deploy the ejb in the continer and is transparet from the deployer ews user.

There are three ways the Web Service can accsess the ejb.

  1. Use the remote interface

  2. java.util.Properties env = PropertyLoader.loadProperties("jndi.properties");
    javax.naming.Context initial = new javax.naming.InitialContext(env);
    Object objref = initial.lookup("ejb/bookquote");
    BookQuoteHome home = (BookQuoteHome)PortableRemoteObject
    				.narrow(objref,BookQuoteHome.class);
    return home.create();
    
  3. Use the Local interface

  4. Context initial = new javax.naming.InitialContext();
    Object objref = jndiContext.lookup("java:comp/env/ejb/"bookquote);
    BookQuoteHome home = (BookQuoteHome)objref;
    return home.create();
    
  5. Use the Internals interface

    ContainerIndex index = ContainerIndex.getInstance();
    int length = index.length();
    for(int i=0;i