Assembling a Web services-enabled WAR file from a WSDL file

 

Assembling a Web services-enabled WAR file from a WSDL file

This topic explains how to use to assemble a Web archive (WAR) file from a Web Services Description Language (WSDL) file that is enabled for Web services.

You can assemble Web Services for J2EE modules with assembly tools provided with WebSphere Application Server.

You must configure the assembly tool before you can use it. You need the following artifacts to complete this task:

Assemble a Web services-enabled WAR file from a WSDL file by following the actions in the steps for this task section.

  1. Start an assembly tool. The 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 Java 2 Platform, Enterprise Edition (J2EE) Version 1.2, 1.3 or 1.4 compliant deployment descriptors.

  2. Click File > Import to import the WAR file into the assembly tool.

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

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

  5. Locate the project for the WAR file that you just imported in the Navigator pane.

  6. Expand the WebContent directory so that the WEB-INF directory is displayed. Expand the WEB-INF directory.

  7. Confirm that the WEB-INF/web.xml deployment descriptor for the Web module contains a <servlet> element including the <servlet-name> element:

    1. Double-click Web Deployment Descriptor . If you are in the Navigator view, you need to double-click on the web.xml deployment descriptor. If you are in the Project Explorer view, you can double-click on Deployment Descriptor. Both of these ways open the Web Deployment Descriptor Editor.

    2. In the Web Deployment Descriptor editor, click the Servlets tab.

    3. Enter the full path name of the Java bean class implementing Web services in the Servlet class field.

    4. Close the editor window to save your change.

  8. Right-click the WEB-INF directory and select New > Folder. Create a subfolder named wsdl in the WEB-INF directory.

  9. Copy the WSDL file to the WEB-INF\wsdl directory by right-clicking the wsdl directory and click Import > File system. Browse the WSDL file for this Web service and click Finish .

  10. Copy the JAX-RPC mapping file as specified by the deployment descriptor <jaxrpc-mapping-file> element of the webservices.xml file.

  11. Copy the webservices.xml, ibm-webservices-ext.xmi, and the ibm-webservices-bnd.xmi deployment descriptors in the WEB-INF subdirectory.

ResultThe artifacts required to enable the Web module for Web services is added to the WAR file.

 

What to do next

Now you can assemble the WAR file that is enabled for Web services into an EAR file.


Related tasks
Assembling a Web services-enabled WAR into an EAR file
Assembling a WAR file that is enabled for Web services from Java code



Searchable topic ID: twbs_assembwarwsdl