Configure the webservices.xml deployment descriptor for handler classes
Use an assembly tool to configure the webservices.xml deployment descriptor for user-provided handler classes.
We can configure deployment descriptors with assembly tools provided with the application server.
A handler class is a class that is written to modify a SOAP message that represents a remote procedure call (RPC) request or response. Handlers can be associated with a web service or a web service client.
Similar to JAX-RPC web services, we can use deployment descriptors to describe JAX-WS web services. For JAX-WS web services, the use of the webservices.xml deployment descriptor is optional because we can use annotations to specify all of the information contained within the deployment descriptor file. Use the deployment descriptor file to augment or override existing JAX-WS annotations. Any information defined in the webservices.xml deployment descriptor overrides any corresponding information specified by annotations.
To complete this task, we need an EAR file for the applications to configure. For some handler use, such as logging or tracing, only the server or client application require configuration. For other handler use, including sending information in the SOAP headers, the client and server applications must be configured with symmetrical handlers.
The modules in the EAR file contain the handler classes to configure. These classes implement the javax.xml.rpc.handler.Handler interface. For more information on writing handler classes, see chapter 6 of the Web Services for Java EE specification. See chapter 9 in the JAX-WS specification or chapter 12 in the JAX-RPC specification for additional information on the handler framework for our programming model. The application modules must contain the webservices.xml deployment descriptor. See the web services specifications and API information to review the JAX-RPC specification along with a complete list of the supported standards and specifications.
Tasks
- Start an assembly tool. Read about starting the assembly tool in the Rational Application Developer information.
- If we have not done so already, configure the assembly tool so that it works on Java EE modules. We need to make sure that the Java EE and Web categories are enabled. Read about configuring the assembly tool in the Rational Application Developer information.
- Migrate the web application archive (WAR) files that are created with the Assembly Toolkit, Application Assembly Tool (AAT) or a different tool to the Rational Application Developer assembly tool. To migrate files, import your WAR files to the assembly tool. Read about migrating code artifacts to an assembly tool in the Rational Application Developer information.
- Configure the client deployment descriptor. Read about the configuring the client deployment descriptor in the Rational Application Developer information.
Related:
Development and assembly tools Configure the JAX-RPC client deployment descriptor for handler classes Handler class properties with JAX-RPC Example: Configuring handler classes for web services deployment descriptors Web services specifications and APIs