Configure the webservices.xml deployment descriptor

 

Before you begin

One can configure deployment descriptors with assembly tools provided with WebSphere Application Server.

You must configure the assembly tool before use it.

Before one can configure the webservices.xml deployment descriptor, develop the deployment descriptor templates and complete the implementation.

 

Overview

This task is one of the steps in developing a Web service. Configure the deployment descriptors so that WAS can process the incoming Web services requests.

Depending on if you are developing a Web service from a Java bean or an enterprise bean:

Then, complete the EJB implementation or complete the JavaBeans implementation. When the EJB implementation is complete, the enterprise bean JAR file is assembled. When the JavaBeans implementation is complete, the Web module WAR file is assembled. These archive files contain the webservices.xml deployment descriptor. The archive files must be assembled before one can configure the webservices.xml deployment descriptor.

Configure the webservices.xml deployment descriptor by following the steps provided in this task section.

 

Procedure

  1. Start an assembly tool. The Eclipse assembly tools, Application Server Toolkit (AST) and Rational Web Developer, provide a graphical interface for developing code artifacts, assembling the code artifacts into various archives (modules) and configuring related J2EE V1.2, 1.3 or 1.4 compliant deployment descriptors.

  2. Click File > Import to import the enterprise bean JAR file or WAR file into the assembly tool.

  3. Open the J2EE perspective by clicking Windows >Open Perspective >J2EE.

  4. Switch to the Project Navigator pane by clicking the Project Navigator tab.

  5. Locate the project containing the webservices.xml file in the Project Navigator pane.

  6. Expand the directories under the project until the META-INF or the WEB-INF directory and its contents are displayed.

  7. Right-click the webservices.xml file.

  8. Select Open. The Web Services editor opens.

  9. Expand the Web service descriptions section and select the service that you want to configure.

  10. Expand the Web service description implementation details section.

    1. Verify that the Web service description name field is unique among all the Web service descriptions in the editor.

    2. Verify that the WSDL file field indicates that there a WSDL file exists in the module. This file, by convention, is located in the META-INF/wsdl directory for an enterprise bean JAR file and in the WEB-INf/wsdl directory for a WAR file.

    3. Verify that the JAX-RPC mapping file field indicates an existing mapping file within the module. This file, by convention, is located in the META-INF directory for an enterprise bean JAR file and in the WEB-INF directory for a WAR file.

  11. Expand the Port components section.

    1. Verify that port component entries correspond to the used WSDL ports in the Port components section.

  12. Select a port_component to open the editor for that port component. The Port Components editor is open.

  13. Expand the Port component implementation details section.

    1. Verify that the WSDL Port Namespace URL and the WSDL Port Local part fields are set to the name space and the local name of the corresponding port in the WSDL file. These fields are configured by the WSDL2Java command tool when the webservices.xml file is generated.

  14. Verify that the Service endpoint interface field names the fully qualified service endpoint interface class. This field is configured by the WSDL2Java command when the webservices.xml file is generated.

  15. Locate and configure the Service implementation bean field.

    1. Configure this field to indicate the enterprise bean or servlet that implements the Web service. Select EJB link for an enterprise bean module, or Servlet link for a Web module.

    2. Use the list in the Service implementation bean field to select the enterprise bean or servlet used to implement the Web service. The choices in the menu come from the enterprise beans that are defined in the ejb-jar.xml file for an enterprise bean module, or the servlets defined in the web.xml file for a Web module.

 

Result

You have a webservices.xml deployment descriptor that is configured.

 

What to do next

Now, configure the ibm-webservices-bnd.xmi deployment descriptor.


 

Related Tasks


Developing Web services deployment descriptor templates for a JavaBeans implementation
Developing Web services deployment descriptor templates for an EJB implementation
Configuring the ibm-webservices-bnd.xmi deployment descriptor