Configure the client deployment descriptor

This topic explains how to configure the client deployment descriptor with an assembly tool.

 

Before you begin

One can configure deployment descriptors with assembly tools provided with WebSphere Application Server.

You must configure the assembly tool before use it. Also, we need an enterprise JavaBeans (EJB) JAR file, WAR file or an application client file that one can import into the assembly tool.

Assemble the client JAR file into an EAR file or assemble the client WAR file into an EAR file.

 

Overview

Complete this task if you are developing a managed client that runs in the J2EE client container. This task is done after you assemble the EJB or Web module.

Configure the client deployment descriptor with an assembly tool by following the steps provided:

 

Procedure

  1. Start an assembly tool. The Eclipse assembly tools, Application Server Toolkit (AST) and Rational Web Developer, provide a graphical interface for developing code artifacts, assembling the code artifacts into various archives (modules) and configuring related J2EE V1.2, 1.3 or 1.4 compliant deployment descriptors.

  2. Click File > Import to import the EJB JAR file, WAR file or application client file into the assembly tool.

  3. Open the J2EE perspective by clicking Windows >Open Perspective >J2EE.

  4. Switch to the Navigator pane by clicking the Navigator tab.

  5. Locate the project containing the client file in the Navigator pane.

  6. Expand the directories under the project until the META-INF or WEB-INF directory and its contents appear.

  7. Right-click the client deployment descriptor file. The client deployment descriptor information is located in the web.xml file for web clients; the ejb-jar.xml file for EJB clients; or in the application-client.xml file for application clients.

  8. Select Open. The Deployment Descriptor editor is opened.

    We can also use the Project Explorer to open the Deployment Descriptor editor. The alternative step is to double-click on the Deployment Descriptor list item for the module and open the Deployment Descriptor editor.

  9. Click the References tab at the bottom of the editor window.

  10. Select the service_reference that you want to configure.

  11. Type the name that the Java Naming Directory Interface (JNDI) uses to locate the service in the Name field. The JNDI lookup string for this service is java:comp/env/service-ref-name. By convention, the service reference name always begins with service/.

  12. Type the name of the service that the client accesses in the Description field.

  13. Type the class name, including package, of the Java interface that is the service interface for this Web service in the Service interface name field.

  14. Type the Web Services Description Language (WSDL) file name used by the client, relative to the root of the module, in the WSDL file field.

  15. Type the file name of the Java mapping file, relative to the root of the module, in the JAX RPC mapping file field.

  16. Click ctrl-s to save the changes.

 

Result

You have a client deployment descriptor that is configured. Now you can test the Web services client to make sure it works in the WebSphere Application Server run time environment.

 

What to do next

Test the Web services client. This task explains how to test an unmanaged client JAR file and an unmanaged client application.


 

Related Tasks


Configuring the Web services client bindings in the ibm-webservicesclient-bnd.xmi deployment descriptor

 

See Also


Web services: Resources for learning