You can assemble an enterprise bean Java archive (JAR) file 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 Java-based web services modules with assembly tools provided with WebSphere® Application Server.
Before assembling a web services-enabled EAR file you must 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 the information on assembling an enterprise bean JAR file from Java code that is enabled for web services.To assemble a web services-enabled EAR file:
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>
You can enable an EAR file for EJB modules that contain web services. Then, deploy the EAR file into WebSphere Application Server.
In this information ...Related concepts
| IBM Redbooks, demos, education, and more(Index) |