This topic explains how to configure the webservices.xml deployment
descriptor with an assembly tool.
Before you begin
Before
you can configure the
ibm-webservices-bnd.xml deployment descriptor,
you must develop the deployment descriptor templates and complete the implementation.
About this task
This task is one of the steps in developing a Web service. You
need to configure the deployment descriptors so that WebSphere Application
Server can process the incoming Web services requests.
Depending on
if you are developing a Web service from a Java bean or an enterprise bean:
Then, complete the EJB
implementation or complete
the JavaBeans implementation. When the EJB implementation is complete,
the enterprise bean Java archive (JAR) file is assembled. When the JavaBeans
implementation is complete, the Web module Web archive (WAR) file is assembled.
These archive files contain the webservices.xml deployment descriptor.
The archive files must be assembled before you can configure the webservices.xml deployment
descriptor.
Configure the webservices.xml deployment descriptor
by following the steps provided in this task section.
Procedure
- The
Eclipse assembly tools, Application Server Toolkit and assembly tools, provide a graphical interface for developing
code artifacts, assembling the code artifacts into various archives (modules)
and configuring related Java 2 Platform, Enterprise Edition (J2EE) Version
1.2, 1.3 or 1.4 compliant deployment descriptors.
- Click File > Import to import
the enterprise bean JAR file or WAR file into the assembly tool.
- Open the Java 2 Platform, Enterprise Edition
(J2EE) perspective by clicking Windows >Open Perspective >J2EE.
- Switch to the Project Navigator pane
by clicking the Project Navigator tab.
- Locate the project containing the webservices.xml file
in the Project Navigator pane.
- Expand the directories under the project
until the META-INF or the WEB-INF directory and its contents
are displayed.
- Right-click the webservices.xml file.
- Select Open. The
Web Services editor opens.
- Expand the Web service descriptions section.
- Select the service that you want to configure.
- Expand the Web service description implementation
details section.
- Verify that the Web service description name field is
unique among all the Web service descriptions in the editor.
- Verify that the WSDL file field indicates that there
a WSDL file exists in the module. This file, by convention, is
located in the META-INF/wsdl directory for an enterprise bean JAR
file and in the WEB-INf/wsdl directory for a WAR file.
- Verify that the JAX-RPC mapping file field indicates
an existing mapping file within the module. This file, by convention,
is located in the META-INF directory for an enterprise bean JAR file
and in the WEB-INF directory for a WAR file.
- Expand the Port components section.
- Verify that port component entries correspond to the used WSDL
ports in the Port components section.
- Select a port_component to open the
editor for that port component. The Port Components editor is open.
- Expand the Port component implementation
details section.
- Verify that the WSDL Port Namespace URL and the WSDL
Port Local part fields are set to the name space and the local name of
the corresponding port in the WSDL file. These fields are configured
by the WSDL2Java command tool when the webservices.xml file
is generated.
- Verify that the Service endpoint interface field
names the fully qualified service endpoint interface class. This
field is configured by the WSDL2Java command when the webservices.xml file
is generated.
- Locate and configure the Service implementation
bean field.
- Configure this field to indicate the enterprise bean or servlet
that implements the Web service. Select EJB link for an enterprise
bean module, or Servlet link for a Web module.
- Use the list in the Service implementation bean field
to select the enterprise bean or servlet used to implement the Web service.
The choices in the menu come from the enterprise beans that are defined
in the ejb-jar.xml file for an enterprise bean module, or the servlets
defined in the web.xml file for a Web module.
Results
You have a webservices.xml deployment descriptor that is
configured.