Assemble a WAR file for your Web services application

This topic explains how to use the command-line tools to assemble a Web service-enabled WAR file.

If you converted an existing application in a Web service, perform the following steps to assemble a Web services-enabled WAR file:

  1. Expand the WAR file into a directory.
  2. Confirm that the WEB-INF/web.xml descriptor for the Web module contains a <servlet-class> element indicating the Java bean class that implements the service.
  3. Place the WSDL file as specified by the deployment descriptor <wsdl-file> element of webservices.xml file in the WEB-INF/wsdl subdirectory.
  4. Place the JAX-RPC mapping file as specified by the deployment descriptor <jaxrpc-mapping-file> element of webservices.xml in the WEB-INF subdirectory.
  5. Place the webservices.xml and ibm-webservices-bnd.xmi deployment descriptors in the WEB-INF subdirectory.
  6. (Optional) If you developed a service endpoint interface class, place it in a subdirectory corresponding to its Java package.
  7. Run this command to add these files to the WAR file:
    jar -uvf WAR_file com WEB-INF/*

If you developed a new Web service application, perform the following steps to assemble a Web services-enabled WAR file:

  1. Expand the WAR file into a directory.
  2. Confirm that the WEB-INF/web.xml deployment descriptor for the Web module contains a <servlet> element including the <servlet-name> element. The <servlet-name> element can be any string and the <servlet-class> element specifies the Java bean class that implements the service.
  3. Place the WSDL file as specified by the webservices.xml deployment descriptor <wsdl-file> element in the WEB-INF/wsdl subdirectory.
  4. Place the JAX-RPC mapping file as specified by the webservices.xml deployment descriptor <jaxrpc-mapping-file> element in the WEB-INF subdirectory.
  5. Place the webservices.xml and ibm-webservices-bnd.xmi deployment descriptors in the WEB-INF subdirectory.
  6. Run this command to add these files to the WAR file:
    jar -uvf WAR_file com WEB-INF/*