Operating Systems: i5/OS
Personalize the table of contents and search results
Assembling a JAR file that is enabled for Web services from an enterprise
bean
You can assemble a Web service-enabled enterprise bean Java archive
(JAR) file with an assembly tool using artifacts generated from tooling.
You can assemble Java-based Web services modules with assembly tools provided with WebSphere Application Server.
You need the following
artifacts that are generated from the WSDL2Java command-line tool to
complete this task:
- An assembled enterprise bean JAR file that is not enabled for Web services
- A compiled Java class for the service endpoint interface
- A Web Services Description Language (WSDL) file
- The complete webservices.xml,ibm-webservices-bnd.xmi,
and ibm-webservices-ext.xmi deployment descriptor, and Java API for
XML-based remote procedure call (JAX-RPC) mapping file.
Overview
Assemble a Web services-enabled enterprise bean JAR file from Java
code by following the actions in the steps for this task section.
Procedure
- Start an assembly tool. See "Starting
WebSphere Application Server Toolkit" in the Application Server Toolkit documentation
for more information.
- If you have not done so already, configure the
assembly tool so that it works on J2EE modules. You need to make sure that
the J2EE and Web categories are enabled. See "Configuring
WebSphere Application Server Toolkit" in the Application Server Toolkit documentation
for more information.
- Migrate JAR files created with the Assembly Toolkit,
Application Assembly Tool (AAT) or a different tool to an AST or Rational Application Developer assembly
tool. To migrate files, import your JAR files to the assembly tool. See "Migrating
code artifacts to an assembly tool" in the Application Server Toolkit documentation.
Results
You have the artifacts required to Web service-enable an Enterprise
JavaBeans (EJB) module for Web services. The artifacts are added to the JAR
file. Now you need to configure the deployment descriptors so that you can
deploy the Web service into the WebSphere Application Server run time environment.
Example
The AddressBook.jar JAR file contains the following files
after assembly. The files added in this task are in bold. These files include
the WSDL file, the deployment descriptors, and the JAX-RPC mapping file.
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
Assemble the EAR file so that you can deploy the EAR file into WebSphere
Application Server.
}
Assembling a Web services-enabled enterprise bean JAR file from a WSDL
file
Assembling Web services applications
Assembling an enterprise bean JAR file into an EAR file
Related Reference
Artifacts used to develop Web services
|