Assembling a Web services-enabled EAR file

 

Before assembling a Web services-enabled enterprise archive file, one of these three tasks should be complete:

This topic explains how to assemble a Web services-enabled EAR file with command-line tools. One can also assemble a Web services-enabled EAR file with the Assembly Toolkit .

To assemble a Web services-enabled EAR file:

 

  1. Assemble the Web services-enabled JAR or WAR file into an EAR file. Now assemble the EAR file that contains the JAR or WAR files. The EAR file can contain an enterprise bean or application client JAR files; Webapps or WAR files; and metadata describing the applications or application.xml files.

 

Results

A Web services-enabled EAR file.

 

Usage scenario

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>

 

What to do next

If the EAR file contains EJB modules, Run the endptEnabler. Then, deploy the EAR file into WebSphere Application Server.


Assembling a Web services-enabled EJB JAR file
Assembling Web services-enabled WAR file
Assembling a Web services-enabled EJB JAR file when starting from Java code
Assembling Web services-enabled EJB JAR file when starting from Web Services Description Language
Assembling a Web services-enabled WAR file when starting from Java code
Assembling a Web services-enabled WAR file when starting from Web Services Description Language
Enabling the EAR file