WAS v8.5 > Develop applications > Develop web services > Assemble web services applications > Assemble web services-enabled clients

Assemble a web services-enabled client WAR file into an EAR file

Now that we have generated the application artifacts, you 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 WebSphere Application Server.

Restriction: Do not include a pound sign (#) in the name of files that are packaged within an application archive. Due to internal processing, the application server fails to correctly deploy the application when a pound sign is included in a file name within the application archive. When this failure occurs, an exception might occur when the application is being processed. Also, parts of the application might be missing after the application is deployed. To address this issue, rename any file names within the application archive so they do not contain a pound sign. 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. You need to verify 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 your WAR files to an assembly tool. Read about importing WAR files using an assembly tool in the Rational Application Developer documentation.


Results

You 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

For JAX-WS applications, you are ready to deploy the web services client application.

For JAX-RPC applications, you need to configure the client deployment descriptor bindings with an assembly tool so the client can communicate with a web service that is deployed on a server.


Related concepts:

Web services
Development and assembly tools


Related


Testing web services-enabled clients
Tasks: Implementing web services applications
Implement static JAX-WS web services clients
Implement JAX-RPC web services clients
Deploy web services client applications
Configure the JAX-RPC web services client deployment descriptor with an assembly tool


Reference:

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


+

Search Tips   |   Advanced Search