WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results

Example: Developing and deploying a JAX-RPC Web service from an existing application

You can develop a JAX-RPC Web service from an Enterprise JavaBeans (EJB) or JavaBeans implementation. The development process is based on the Web Services for Java 2 Platform, Enterprise Edition (J2EE) specification.

  1. Select the enterprise bean or JavaBeans implementation that you want to enable as a JAX-RPC Web service.
    The implementation must meet the following Web Services for J2EE specification requirements:
    • It must have methods that can be mapped to a service endpoint interface. See step 2 for more information.
    • It must be a stateless session EJB implementation or a JavaBeans implementation without client-specific state, because the implementation bean might be selected to process a request from any client. If a client-specific state is required, a client identifier must be passed as a parameter of the Web service operation.

      The selected methods of an enterprise bean must not have a transaction attribute of mandatory, because no standard currently exists, for these Web services transactions.

      A JavaBeans implementation in a Web container requires the following contents:
      • A public default constructor
      • Exposed public methods
      • It must not save a client-specific state between method calls
      • It must be a public, non-final, and non-abstract class
      • It must not define a finalize method
  2. Develop a service endpoint interface.

    Developing a Web service requires a service endpoint interface.

    If you are using an EJB implementation, develop a service endpoint interface from an EJB remote interface.

    If you are using a JavaBeans implementation, develop a service endpoint interface for a JavaBeans implementation.

  3. Develop a Web Services Description Language (WSDL) file.
  4. Develop deployment descriptor templates.

    If you are using an EJB implementation, develop Web services deployment descriptor templates from an EJB implementation.

    If you are using a JavaBeans implementation, develop Web services deployment descriptor templates for a JavaBeans implementation.

  5. Configure the deployment descriptors.

    By setting the ejb-link or servlet-link values of the service-impl-bean elements you can link to the enterprise bean or JavaBeans implementation that implement the service.

    Configure the webservices.xml deployment descriptor.

    Configure the ibm-webservices-bnd.xmi deployment descriptor.

  6. Assemble an enterprise archive (EAR) file from a JAR file or assemble an EAR file from a WAR file.
  7. Enable the Web service-enabled EAR file.

    This step only applies if you are using an EJB implementation.

  8. Deploy the Web service application.
  9. Publish the WSDL file.

Review the API Documentation for a complete list of API's. You can also review several articles about the development of Web services at Web services: Resources for learning.

Web services development process based on Web Services for J2EE




Related tasks
Developing Web services applications from JavaBeans
Reference topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/rwbs_devxmp.html