Assembling Web services-enabled EJB JAR file when starting from WSDL
You need the following artifacts...
- An assembled Enterprise JavaBean (EJB) JAR file containing the EJB implementation and all classes generated by the WSDL2Java command tool when the role argument is develop-server and the container argument is EJB.
- 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.
Use the Assembly Toolkit to assemble Web services-enabled JAR files. The Assembly Toolkit replaces the Application Assembly Tool (AAT). It is one of the tools available with the Application Server Toolkit product.
To assemble a Web services-enabled EJB JAR file when starting from WSDL...
- 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 for the JAR file you just imported in the Project Navigator pane.
- Expand the ejbModule entry so the META-INF directory is displayed. Expand the META-INF directory.
- Right-click the META-INF directory and select 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 as specified by the deployment descriptor <jaxrpc-mapping-file> element of webservices.xml.
- Copy webservices.xml, ibm-webservices-bnd.xmi and ibm-webservices-ext.xmi into the META-INF subdirectory in the same manner.
The artifacts required to enable an EJB module for Web services are added to the JAR file.
Usage Scenario
After assembling a JAR file named AddressBook.jar 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/AddressBookSoapBindingImpl.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 a Web services-enabled EJB JAR file when starting from Java code
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
Developing a new Web service from an existing WSDL file using a stateless session enterprise bean