Assembling a Web services-enabled EJB JAR file when starting from Java code
You need the following artifacts...
- Assembled Enterprise JavaBean (EJB) JAR file (not enabled for Web services)
- Compiled Java class for the Service Endpoint Interface
- WSDL file
- Complete webservices.xml,ibm-webservices-bnd.xmi, ibm-webservices-ext.xmi and Java API for XML-based remote procedure call (JAX-RPC) mapping deployment descriptors.
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...
- Start the Assembly Toolkit.
- Click File > Import to import the EJB JAR file into the Assembly Toolkit.
- Open the J2EE perspective by clicking Windows >Open Perspective > Other > J2EE.
- Switch to the Project Navigator pane by clicking the Project Navigator tab.
- Locate the project containing the JAR file you just imported in the Project Navigator pane.
- Expand the ejbModule entry until the META-INF directory displays. Expand the META-INF directory.
- Right-click the META-INF directory and click New > Folder. Create a subfolder named wsdl in the META-INF directory.
- 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.
- Copy the JAX-RPC mapping file, webservices.xml, ibm-webservices-bnd.xmi, and ibm-webservices-ext.xmi files into the META-INF directory.
- 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.
The artifacts required to Web service-enable an EJB module for Web services are added to the JAR file.
Usage Scenario
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.xmlConfigure the webservices.xml deployment descriptor .
See Also
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
Artifacts used to develop Web services based on Web Services for J2EE