This task explains how to assemble the enterprise bean Java archive (JAR) file that you created in the previous task into an enterprise archive (EAR) file with an assembly tool. Assembling the JAR file, and now the EAR file, are required tasks to enable Java code 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. Before assembling a Web services-enabled EAR file assemble an enterprise bean JAR file that you want to enable for Web services. To learn more about the artifacts that are needed for the assembly of the enterprise bean JAR file see Assemble an enterprise bean JAR file from Java code that is enabled for Web services.
To assemble a Web services-enabled EAR file:
ResultA 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.jar
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>AddressBookJ2WEE</display-name> <description>AddressBook EJB Example from Java</description> <module id="EjbModule_1"> <ejb>AddressBook.jar</ejb> </module> </application>
Related tasks
Starting an assembly tool
Assembling a JAR file that is enabled for Web services from an enterprise bean
Assembling a Web services-enabled enterprise bean JAR file from a WSDL
file
Enabling an EAR file for Web services