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
- 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.
- Click File > Import to import the EJB JAR file, WAR file or application client file into the assembly tool.
- Open the J2EE perspective by clicking Windows >Open Perspective >J2EE.
- Switch to the Navigator pane by clicking the Navigator tab.
- Locate the project containing the client file in the Navigator pane.
- Expand the directories under the project until the META-INF or WEB-INF directory and its contents appear.
- 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.
- 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.
- Click the References tab at the bottom of the editor window.
- Select the service_reference that you want to configure.
- 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/.
- Type the name of the service that the client accesses in the Description field.
- 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.
- 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.
- Type the file name of the Java mapping file, relative to the root of the module, in the JAX RPC mapping file field.
- 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