[Version 5.0.2 and later]Assembling a Web services-enabled EJB JAR file when starting from Java code

Before you begin

You need the following artifacts:

Why and when to perform this task

This topic explains how to assemble a Web service-enabled EJB JAR file with the Assembly Toolkit. The Assembly Toolkit replaces the Application Assembly Tool (AAT) and is one of the tools available with the Application Server Toolkit product.

To assemble an Web services-enabled EJB JAR file when starting from Java code:

Steps for this task

  1. Start the Assembly Toolkit.
  2. Click File > Import to import the EJB JAR file into the Assembly Toolkit.
  3. Open the J2EE perspective by clicking Windows >Open Perspective > Other > J2EE.
  4. Switch to the Project Navigator pane by clicking the Project Navigator tab.
  5. Locate the project containing the JAR file you just imported in the Project Navigator pane.
  6. Expand the ejbModule entry until the META-INF directory displays. Expand the META-INF directory.
  7. Right-click the META-INF directory and click New > Folder. Create a subfolder named wsdl in the META-INF directory.
  8. Copy the WSDL file to the META-INF\wsdl directory by right-clicking on the wsdl directory and click File > Import > File system. Browse the WSDL file for this Web service and click Finish.
  9. Copy the JAX-RPC mapping file, webservices.xml, ibm-webservices-bnd.xmi, and ibm-webservices-ext.xmi files into the META-INF directory.
  10. Import the Service Endpoint Interface class so its package begins in the ejbModule directory.
    You can import either the source file or compiled class file. If you import the source file it automatically compiles.

Results

The artifacts required to Web service-enable an EJB module for Web services are added to the JAR file.

Example

After assembling a JAR file named AddressBook.jar, the JAR file contains the following files. The files added in this task are in bold:

META-INF/MANIFEST.MF 
META-INF/ejb-jar.xml 
addr/Address.class 
addr/AddressBook_RI.class 
addr/AddressBookBean.class 
addr/AddressBookHome.class 
addr/Phone.class 
addr/StateType.class 
addr/AddressBook.class 
META-INF/wsdl/AddressBook.wsdl 
META-INF/ibm-webservices-bnd.xmi 
META-INF/ibm-webservices-ext.xmi
META-INF/webservices.xml
META-INF/AddressBook_mapping.xml

What to do next

Configure the webservices.xml deployment descriptor .

Related tasks
Assembling Web services-enabled EJB JAR file when starting from WSDL
Assembling Web services applications based on Web Services for J2EE
Assembling a Web services-enabled EJB JAR file
Assembling a Web services-enabled EJB JAR into an EAR file
Related reference
Artifacts used to develop Web services based on Web Services for J2EE



Searchable topic ID:   twbs_assembjarjava
Last updated: Jun 21, 2007 4:12:58 PM CDT    WebSphere Application Server Express, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/twbs_assembjarjava.html

Library | Support | Terms of Use | Feedback