Implementing Web services applications from existing WSDL files with JAX-WS

When starting with an existing Web Services Description Language (WSDL) file, you can use a top-down approach to developing Web services based on the Java™ API for XML-Based Web Services (JAX-WS) programming model.

Before you begin

Best practice: IBM® WebSphere® Application Server supports the Java API for XML-Based Web Services (JAX-WS) programming model and the Java API for XML-based RPC (JAX-RPC) programming model. JAX-WS is the next generation Web services programming model extending the foundation provided by the 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. bprac

Locate the WSDL file that defines the Web service that you want to implement. You can develop a WSDL file or obtain one from an existing Web service through e-mail, downloading or a Uniform Resource Locator (URL).

About this task

To develop Web services based on the JAX-WS programming model, you can use a bottom-up development approach starting from existing JavaBeans™ or enterprise beans or you can use a top-down development approach starting with an existing Web Services Description Language (WSDL) file. This task describes the steps when using the top-down development approach.

Considerations when using JavaBeans

JavaBeans exposed as JAX-WS Web services are supported only over an HTTP transport.

Considerations when using enterprise beans
  • The enterprise bean must be a stateless session bean.
  • Enterprise beans that are exposed as JAX-WS Web services must be packaged in EJB 3.0 or higher modules.
  • JAX-WS Web service applications containing enterprise beans must be deployed with the endptEnabler command.
  • JAX-WS Web services using enterprise beans are supported over an HTTP or Java Message Service (JMS) transport.

Procedure

  1. Set up a development environment for Web services.
  2. Develop Java artifacts for JAX-WS applications using the wsimport command-line tool.
  3. (optional) Enable MTOM for JAX-WS Web services.
  4. (optional) Develop and configure a webservices.xml deployment descriptor for JAX-WS applications.
  5. Complete the implementation of your Web service application.
  6. (Optional) Customize URL patterns in the web.xml file.
  7. Assemble the artifacts for your Web service.
  8. Deploy the EAR file into the application server.
  9. Test the Web service to make sure that the service works with the application server.

Results

You have created a JAX-WS Web service by starting with an existing WSDL file.




In this information ...


Related concepts

IBM Redbooks, demos, education, and more


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

This feature requires Internet access.



Terms of Use | Feedback

Last updated: Oct 20, 2010 9:51:45 PM CDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/twbs_devwbsjaxwswsdl.html