+

Search Tips   |   Advanced Search

Assembling a Web services-enabled client WAR file into an EAR file


Now that we have generated the application artifacts, we need to assemble these artifacts to create an EAR file used in the Web services application.

We can assemble Java -based Web services modules with assembly tools provided with WAS.

Assemble the client code and artifacts that enable the application client to access a Web service with steps provided:

 

  1. Start an assembly tool. Read about starting the assembly tool in the Rational Application Developer documentation.

  2. If we have not done so already, configure the assembly tool so that it works on Java EE modules. we need to make sure that the Java EE and Web categories are enabled. Read about configuring the assembly tool in the Rational Application Developer documentation.

  3. Migrate WAR files created with the Assembly Toolkit, Application Assembly Tool (AAT) or a different tool to the Rational Application Developer assembly tool. To migrate files, import the WAR files to an assembly tool. Read about importing WAR files using an assembly tool in the Rational Application Developer documentation.

 

Results

we have assembled the artifacts required to enable the client application for Web services into an EAR file.

 

Example

This example of the assembly process uses the AddressBookWeb.war WAR file and the AddressBook.ear EAR file:

WEB-INF/MANIFEST.MF WEB-INF/web.xml WEB-INF/wsdl/AddressBook.wsdl WEB-INF/AddressBook_mapping.xml WEB-INF/ibm-webservicesclient-ext.xmi (optional) WEB-INF/ibm-webservicesclient-bnd.xmi  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 AddressBookWeb.war file into the AddressBook.ear file, the AddressBook.ear file contains the following files:

META-INF/MANIFEST.MF  AddressBookWeb.war META-INF/application.xml

 

Next steps

For JAX-WS applications, we are ready to deploy the Web services client application.

For JAX-RPC applications, we need to configure the client deployment descriptor bindings so that the client can communicate with a Web service that is deployed on a server.


Web services
Assembly tools

 

Related tasks


Testing Web services-enabled clients
Task overview: Implement Web services applications
Implementing JAX-WS Web services clients
Implementing JAX-RPC Web services clients
Deploy a Web services client application
Set the JAX-RPC Web services client deployment descriptor with an assembly tool

 

Related


Artifacts used to develop Web services
wsimport command for JAX-WS applications
WSDL2Java command for JAX-RPC applications