You can configure JAX-RPC Web services client deployment descriptor
with an assembly tool.
About this task
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
- 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.
You 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.
Results
You have a client deployment descriptor that is configured.
What to do next
Test the Web services
client. This task explains how to test an unmanaged client Java archive
(JAR) file and an unmanaged client application.