JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Using SOAP Message Handlers     Java CAPS Documentation
search filter icon
search icon

Document Information

Using SOAP Message Handlers

About SOAP Message Handlers

Uses for SOAP Message Handlers

JAX-RPC Message Handler Archive Files

SOAP Message Handler Chains

SOAP Message Handlers in Java CAPS

Importing a JAX-RPC Handler Archive

To Import an Existing Message Handler Archive

Creating a JAX-RPC Handler Chain

To Create a New Chain of Message Handlers

Assigning Handler Chains to External Systems

To Assign the Handler Chain to a SOAP/HTTP Web Services External System

Implementing Custom SOAP Message Handlers

Creating a SOAP Message Handler Archive File

To Create the SOAP Message Handler Archive File

Sample SOAP Message Handler: Console Logger Handler

Sample Descriptor File for the Console Logger Handler

About SOAP Message Handlers

As defined in the JAX-RPC specification, message handlers provide a mechanism for adding, reading, and manipulating header blocks in SOAP messages that are sent and received by JAX-RPC clients and web service endpoints. By providing access to SOAP headers, you can import custom code to support SOAP standards that are not supported in basic versions of Java CAPS.

Although message handlers are Project-specific, they are added in Java CAPS Environments to allow easy reuse across multiple Projects. Multiple handlers can be installed or removed as needed, and they also may be chained, which allows staged execution of different types of processing modules.

Java CAPS version control is applied to all Environment sub-nodes and associated artifacts in the NetBeans IDE. You also may employ your own version control system for the handler code you import into Java CAPS.

Uses for SOAP Message Handlers

Since SOAP message handlers have access to the entire SOAP message during request and response operations, there are many use cases for them. Examples of message handler uses include:

JAX-RPC Message Handler Archive Files

JAX-RPC message handlers for use with Java CAPS are packaged in handler archives. A Handler archive consists of a ZIP file containing the following components:

The handler implementations might be dependent on the runtime configuration, so at design-time the handlers are configured in the Java CAPS Environment. This allows the reuse of the same message handler implementations across multiple projects in the same environment.

SOAP Message Handler Chains

As defined in the JAX-RPC specification, the message handlers are ordered in a message handler chain and configured on the consumer or provider web service endpoints. This chained configuration enables the staged execution of custom SOAP message processing. When a web service request arrives at an endpoint, the handleRequest method for these handlers is called in the same order as they are ordered in the handler chain. When the response is sent back, the handleResponse method on these handlers is called in the reverse order as defined in he handler chain.

SOAP Message Handlers in Java CAPS

JAX-RPC message handlers are incorporated into Java CAPS Projects by means of a three-stage process:

  1. Importing a handler archive, which can contain one or more individual handlers.

  2. Creating one or more handler chains, each of which can contain one or more individual handlers in a specific order.

  3. Associating the handler chains with specific SOAP/HTTP Web Service External Services.

The following topics provide instructions on how to proceed through this process.


Note - For more information about SOAP message handlers, along with sample projects, see the Java CAPS sample site at http://javacaps-samples.samplecode.oracle.com. Click the JAX-WS and JAX-RPC tab for more information.


Java CAPS provides pre-installed handler implementations in the Repository. These include a logging handler and a security handler that enables ws-security support.