[Version 5.0.2 and later]Assembling a Web services-enabled client JAR file into an EAR file

Before you begin

You need the following artifacts:

Why and when to perform this task

You can use the Assembly Toolkit to assemble Web service-enabled client applications.

To assemble the client code and artifacts that enable the application client to access a Web service:

Steps for this task

  1. Start the Assembly Toolkit.
  2. Click File > Import to import the EJB JAR file, App Client JAR file, or WAR 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 for the file you just imported in the Project Navigator pane.
  6. Expand the ejbModule (for an EJB JAR file) or the appClientModule (for the application client JAR file) entry so the META-INF directory is displayed. Expand the META-INF directory.
  7. Right-click the META-INF directory and select New > Folder. Create a subfolder named wsdl in the META-INF directory.
    1. 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.
    2. Copy the webservicesclient.xml and the JAX-RPC mapping files in the META-INF subdirectory in the same manner you copied the WSDL file.
      The JAX-RPC mapping file is indicated by the jaxrpc-mapping-file element in the webservicesclient.xml file.
    3. (Optional) Place the ibm-webservicesclient-ext.xmi and the ibm-webservicesclient-bnd.xmi file in the META-INF subdirectory, if used.
  8. Assemble the JAR file into an EAR file using typical assembly techniques if the client runs in a container.
  9. Right-click on the WEB-INF directory and select New > Folder. Create a subfolder named wsdl in the WEB-INF directory.
    1. Copy the WSDL file to the WEB-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.
    2. Copy the webservicesclient.xml and JAX-RPC mapping files in the WEB-INF subdirectory in the same manner you copied the WSDL file.
      The JAX-RPC mapping file is indicated by the jaxrpc-mapping-file element in the webservicesclient.xml file.
    3. (Optional) Place the ibm-webservicesclient-ext.xmi and ibm-webservicesclient-bnd.xmi file in the WEB-INF subdirectory, if used.

Results

The artifacts required to enable the client module to use Web services are added to the module.

Example

This example uses a JAR file named AddressBookClient.jar and an EAR file named AddressBookClient.ear:

META-INF/MANIFEST.MF
META-INF/application-client.xml
META-INF/wsdl/AddressBook.wsdl
META-INF/webservicesclient.xml
META-INF/AddressBook_mapping.xml

com/ibm/websphere/samples/webservices/addr/Address.class
com/ibm/websphere/samples/webservices/addr/AddressBook.class
com/ibm/websphere/samples/webservices/addr/AddressBookClient.class
com/ibm/websphere/samples/webservices/addr/AddressBookService.class
...other generated classes...

After assembling the AddressBookClient.jar file into the AddressBookClient.ear file, the AddressBookClient.ear file contains the following files:

META-INF/MANIFEST.MF 
AddressBookClient.jar 
META-INF/application.xml

What to do next

Configure the webservicesclient.xml deployment descriptor .

Related concepts
Web services
Related tasks
Testing Web services-enabled clients
Configuring the ibm-webservicesclient-bnd.xmi deployment descriptor
Implementing Web services based on Web Services for J2EE
Developing Web services clients based on Web Services for J2EE
Related reference
Artifacts used to develop Web services based on Web Services for J2EE



Searchable topic ID:   twbs_assembclient
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/twbs_assembclient.html

Library | Support | Terms of Use | Feedback