For J2EE 1.3 and 1.4 modules
that include Web service references, you can use the deployment descriptor
editor to define and configure Web service handlers for each Web service
reference. Handlers allow you to process SOAP message header traffic
for the remote call to the Web service. The SOAP header is defined
by the SOAP specification. Handlers are defined by JAX-RPC and the
Web Services for J2EE specification. You can use the deployment descriptor
editor to to define Web service handler for a Web service reference:
About this task
When you define a handler for
a Web service reference, the handler element is added
to the related service reference (the service-ref element). For J2EE 1.3, the service-ref element
is in the webservicesclient.xml file. For J2EE 1.4, it is in the deployment
descriptor.
Procedure
- In the Enterprise Explorer of the Java™ EE perspective, expand the project tree
and select the deployment descriptor for your project where you want
to define a Web service handler. You can define Web service
handlers for Web service references in EJB projects, application client
projects, and web projects.
- Right-click the deployment descriptor and select from the pop-up menu. The appropriate
deployment descriptor for your project type opens. For example, an
EJB module opens in the EJB deployment descriptor editor.
- Click the WS Handler tab to go to
the Handlers page of the deployment descriptor editor.
- In the Service references drop-down
list, select the Web service reference that you want to define the
handler for.
- Click Add to open the New Handler
dialog box and define the handler:
- In the Display name field, type
a value for the display-name element in the deployment
descriptor.
- In the Description field, type
a value for the description element for the handler.
- In the Handler name field, type
a value for the handler-name element.
- In the Handler class field, enter
the fully qualified name of the Java class for the handler. This value is used in the handler-class element.
- Click Finish. The handler is added
to the list of handlers defined for the selected reference. If you
select the handler, you can see and modify the properties.
- Optional: In the Icons section, you can specify small and large GIF or JPEG images to help
identify the Web service handler at run time. The images must first
be imported into the project.
- Optional: In the Initial parameters section, click the Add button to define a
name and value for an initialization parameter for the selected handler.
- Optional: In the SOAP headers section, click the Add button to define the
namespace URL and local part for a new SOAP header for the handler.