Generating Stateless Session Bean Web Services

PowerDesigner supports the Web Services for J2EE specification that defines the programming model and runtime architecture for implementing Web services.

In Java, Web services may be implemented either through JAX-RPC endpoints or EJB stateless session bean components. Both of these implementations expose their Web methods through a service endpoint interface (SEI).

JAX-RPC endpoints are considered as Web components, they are represented as servlets in the OOM and are packaged into a WAR, while EJB stateless session beans are packaged into an EJB JAR. In both cases, WSDL files, and the required deployment descriptors should be included in the WEB-INF or META-INF directories. You can refer to chapters 5 and 7 of the Web Services for J2EE specification for more information.

If the Web service implementation type is Stateless Session Bean, PowerDesigner uses Web Services for J2EE specification for implementation.

Developing Stateless Session Bean as Web Service is similar to JAX-RPC: you use a Bean class instead of a normal Java class. As for JAX-RPC, it is limited to simple message formats.

For more information on JAX-RPC, see Generating JAX-RPC Web services.

  1. Select Language > Generate Java Code .
  2. Select a directory where you want to generate the code.
  3. In the Tasks tab, to generate server side code, select the command WSDL: Compile and PackageWeb Service Server-Side Code into an archive. To generate client proxy, select the command WSDL: Compile and PackageWeb Service Client Proxy into an archive.

    These commands will compile the Java classes generated by PowerDesigner, run the WSCOMPILE tool and create a .WAR file.



  4. Click OK.

If you have an application server that supports Web Services for J2EE, you can add a profile and use the deployment command to deploy the generated .JAR file directly into the server.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com