WAS v8.5 > WebSphere applications > Web services > Bus-enabled web servicesService integration technologies and JAX-RPC handlers
A JAX-RPC handler is a Java class that performs a range of handling tasks.For example: logging messages, or transforming their contents, or terminating an incoming request. Handlers monitor messages at ports, and take appropriate action depending upon the sender and content of each message.
The Java API for XML-based remote procedure calls (JAX-RPC) provides you with a standard way of developing interoperable and portable web services. JAX-RPC is part of the Java EE, and JAX-RPC handlers are a standard approach in Java for intercepting and filtering service messages. For more information, see the IBM developerWorks article Support for J2EE Web Services in WebSphere Studio Application Developer V5.1 -- Part 3: JAX-RPC Handlers.
Any JAX-RPC handlers you write, including those written for other systems, can be configured for use with a service integration bus inbound or outbound service. This configuration is a four-stage process:
- Make the handler class available at the port.
- Create a handler configuration.
- Add the handler to a handler list.
- Apply the handler list to the port.
Make the handler class available at the port
A JAX-RPC handler interacts with messages as they pass into and out of the service integration bus, therefore you make the handler class available to the server or cluster that hosts the inbound or outbound port for the service to monitor. To monitor an inbound port, make the handler class available to the server on which the endpoint listener for that port is located. To monitor an outbound port, make the handler class available to the server on which the outbound port destination is localized.For more information, see Loading JAX-RPC handler classes.
Create a handler configuration
To make WAS aware of your JAX-RPC handler, and to make the handler available for inclusion in one or more handler lists, we use the dmgr console to create a new JAX-RPC handler configuration. We can configure multiple instances of a handler by creating each instance with a different handler name, and pointing to the same handler class. For more information, see Create a new JAX-RPC handler configuration.
Add the handler to a handler list
To enable handlers to undertake more complex operations, you chain them together into handler lists. The approach taken in WAS is to apply handler lists (rather than individual handlers) at the ports, where each handler list contains one or more handlers. For more information, see Create a new JAX-RPC handler list.
Apply the handler list to the port
You associate each handler list with one or more ports, so the handler list can monitor activity at the port, and take appropriate action depending upon the sender and content of each message that passes through the port:
- To monitor or transform messages received for an inbound service, apply a handler list to the associated inbound port.
- To monitor or transform messages flowing between an outbound service and an associated external web service, apply a handler list to the associated outbound port.
To apply a handler list, select it for use with an inbound or outbound service as described in Modify an existing inbound service configuration or Modify an existing outbound service configuration.