Developing Web services applications from existing WSDL files with JavaBeans

You can develop a new Web service with an existing Web Services Description Language (WSDL) file using JavaBeans.

Before you begin

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

About this task

Best practice New or updated for this feature pack Best practice: 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. bprac

You can use a top-down development approach to create a JAX-WS or JAX-RPC Web service with an existing WSDL file using JavaBeans. You can also use a bottoms-up development approach to create a JAX-WS or JAX-RPC Web service from JavaBeans.

Procedure

  1. Set up a development environment for Web services. You do not have to set up a development environment if you are using Rational Application Developer.
  2. Develop Java artifacts from a WSDL file.
    • New or updated for this feature pack For JAX-WS Web service applications, use the wsimport command-line tool to develop Java artifacts from a WSDL file. You need to complete this step to generate the required JAX-WS portable artifacts that are used to develop JAX-WS Web services.
    • For JAX-RPC Web service applications, use the wsdl2java command-line tool to develop Java implementation templates and bindings from a WSDL file. You need to complete this step to create the deployment descriptor templates that are configured to map the service implementation to the JavaBeans implementation.
  3. Complete the JavaBeans implementation. Write your JavaBeans implementation to complete your Web service application.
  4. Configure the webservices.xml deployment descriptor (JAX-RPC applications only). Configure the ibm-webservices-bnd.xml deployment descriptor so that WebSphere Application Server can process the incoming Web services requests. For JAX-WS applications, deployment descriptors are not supported and are replaced by the use of annotations.
  5. Configure the ibm-webservices-bnd.xmi deployment descriptor (JAX-RPC applications only). Configure the ibm-webservices-bnd.xml deployment descriptor so that WebSphere Application Server can process the incoming Web services requests.
  6. Assemble a Web archive (WAR) file when starting from a WSDL file. You can assemble the artifacts that are required to enable the Web module for Web services into a WAR file.
  7. Assemble a Web services-enabled WAR into an enterprise archive (EAR) file. You can assemble the artifacts that are required to enable the Web module for Web services into an EAR file.
  8. Deploy the enterprise archive (EAR) file into WebSphere Application Server. You can now deploy the EAR file that has been configured and enabled for Web services.

Results

You have created a new Web service by starting with an existing WSDL file using JavaBeans.

What to do next

After you deploy the EAR file, test the Web service to make sure that it works with the application server.

New or updated for this feature pack The Feature Pack for Web Services provides Samples that demonstrate JAX-WS-based Web services using many of the new functions and standards supported in this Feature Pack. The Samples demonstrate the simple message exchange patterns using both synchronous and asynchronous invocation of Web services in SOAP 1.1 and SOAP 1.2 environments. The samples demonstrate the use of JavaBeans artifacts and static service endpoints and proxy-based clients. To learn more about these Samples, see the Samples readme located in the app_server_root/samples/lib/WebServicesSamples directory. Refer to the topic on installing the Samples using the administration console to learn how to install these Samples onto an application server that has been augmented with a Web services profile.




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_devwsdl1
File name: twbs_devwsdl1.html