Completing the EJB implementation

This task explains how to complete the Enterprise JavaBeans (EJB) implementation.

Before you begin

New or updated for this feature pack Important: The WebSphere® Application Server Version 6.1 Feature Pack for Web Services extends the capabilities of this product to introduce support for the Java API for XML-Based Web Services (JAX-WS) 2.0 programming model. JAX-WS is the next generation Web services programming model complimenting the foundation provided by the Java API for XML-based RPC (JAX-RPC) programming model. Using the strategic JAX-WS programming model, development of Web services and clients is simplified through support of a standards-based annotations model. Although the JAX-RPC programming model and applications are still supported, take advantage of the easy-to-implement JAX-WS programming model to develop new Web services applications and clients.
Supported configurations New or updated for this feature pack Supported configurations: The Feature Pack for Web Services only supports hosting JavaBeans endpoints within the Web container for JAX-WS Web services applications. To develop enterprise beans hosted as Web services, you must use the JAX-RPC programming model. sptcfg
Develop EJB implementation templates and bindings from a WSDL file. The deployment descriptor templates that are generated from a Web Services Description Language (WSDL) file are required to complete the EJB implementation in the Web services development process.

About this task

When you complete the EJB implementation, you are assembling an enterprise bean Java archive (JAR) file that contains the EJB and supporting classes created from a WSDL file.

Complete the EJB implementation by following the steps provided in this task section.

Procedure

  1. Inspect the EJB remote interface template, portType_RI.java. If necessary, modify the template. The value portType is the name of the <wsdl:portType> element in the WSDL file.
  2. Inspect the portTypeHome.java EJB home interface template. If necessary, modify the template.
  3. Edit the bindingImpl.java EJB implementation template. Where binding is the name of the <wsdl:binding> element in the WSDL file.
    1. Complete the implementation of the methods in the template.
    2. (Optional) Make changes if necessary.
    3. (Optional) Change the class name if the binding name is not acceptable.
  4. Compile all the Java classes.
  5. Assemble an EJB Java archive (JAR) file. Assemble all the Java classes into an enterprise bean JAR file using the typical EJB assembly tools. Include all of the classes generated from running the WSDL2Java command tool when developing implementation templates and bindings from a WSDL file.

Results

You have an enterprise bean JAR file containing an EJB and supporting classes created from a WSDL file.

What to do next

Now that you have gathered the required artifacts for developing a Web service with an enterprise bean, you need to configure the webservices.xml deployment descriptor .



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 1:23:07 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=twbs_EJBimp
File name: twbs_EJBimp.html