Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web services > Assembling web services applications > Assembling web services applications


Assembling a web services-enabled WAR into an EAR file

We can assemble a web services-enabled web application archive (WAR) file into an EAR file with an assembly tool.

We can assemble Java-based web services modules with assembly tools provided with WAS.

Restriction: Do not include a pound sign (#) in the name of files that are packaged within an application archive. Due to internal processing, the application server fails to correctly deploy the application when a pound sign is included in a file name within the application archive. When this failure occurs, an exception might occur when the application is being processed. Also, parts of the application might be missing after the application is deployed. To address this issue, rename any file names within the application archive so that they do not contain a pound sign.

Assemble a web services-enabled WAR file into an EAR file using the steps provided in this task section.


Procedure

  1. Start an assembly tool. Read about starting the assembly tool in theRational Application Developer documentation.
  2. Assemble the web services-enabled WAR file into an EAR file. Assemble the EAR file that contains the JAR or WAR files. The EAR file can contain an enterprise bean or application client JAR files; web applications or WAR files; and metadata describing the applications or application.xml files.

    To learn more about how to assemble the WAR file, see the assembling applications documentation.


Results

A web services-enabled EAR file.


Example

In the following example, there is an application.xml deployment descriptor packaged with a web services-enabled JAR file called AddressBook.jar that is packaged into an EAR file called AddressBook.ear. The EAR file contains:

META-INF/MANIFEST.MF
META-INF/application.xml
AddressBook.war

An example of the application.xml deployment descriptor is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application id="Application_ID">
<display-name>AddressBook
</display-name>
<description>AddressBook Example from Java bean
</description>
<module id="WebModule_1">
<web>
<web-uri>AddressBook.war
</web-uri>
<context-root>/AddressBook
</context-root>
</web>
</module>
</application> 


What to do next

Deploy your web services.
Assembly tools
Assembling a WAR file that is enabled for web services from Java code
Assembling a web services-enabled WAR file from a WSDL file
Deploy web services applications onto application servers
Assembling applications

+

Search Tips   |   Advanced Search