Chapter 64. Apache CXF Provided Interceptors
64.1. Core Apache CXF Interceptors
Inbound
Table 64.1, “Core inbound interceptors” lists the core inbound interceptors that are added to all Apache CXF endpoints.
Table 64.1. Core inbound interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Invokes the proper method on the service. |
Outbound
The Apache CXF does not add any core interceptors to the outbound interceptor chain by default. The contents of an endpoint’s outbound interceptor chain depend on the features in use.
64.2. Front-Ends
JAX-WS
Table 64.2, “Inbound JAX-WS interceptors” lists the interceptors added to a JAX-WS endpoint’s inbound message chain.
Table 64.2. Inbound JAX-WS interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Creates holder objects for any out or in/out parameters in the message. |
|
|
| Unwraps the parts of a wrapped doc/literal message into the appropriate array of objects. |
|
|
| Passes message processing to the JAX-WS logical handlers used by the endpoint. When the JAX-WS handlers complete, the message is passed along to the next interceptor on the inbound chain. |
|
|
| Passes message processing to the JAX-WS SOAP handlers used by the endpoint. When the SOAP handlers finish with the message, the message is passed along to the next interceptor in the chain. |
Table 64.3, “Outbound JAX-WS interceptors” lists the interceptors added to a JAX-WS endpoint’s outbound message chain.
Table 64.3. Outbound JAX-WS interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Removes the values of any out and in/out parameters from their holder objects and adds the values to the message’s parameter list. |
|
|
| Processes outbound fault messages. |
|
|
| Makes sure that wrapped doc/literal messages and rpc/literal messages are properly wrapped before being added to the message. |
|
|
| Passes message processing to the JAX-WS logical handlers used by the endpoint. When the JAX-WS handlers complete, the message is passed along to the next interceptor on the outbound chain. |
|
|
| Passes message processing to the JAX-WS SOAP handlers used by the endpoint. When the SOAP handlers finish processing the message, it is passed along to the next interceptor in the chain. |
|
|
| Calls back to the Destination object to have it setup the output streams, headers, etc. to prepare the outgoing transport. |
JAX-RS
Table 64.4, “Inbound JAX-RS interceptors” lists the interceptors added to a JAX-RS endpoint’s inbound message chain.
Table 64.4. Inbound JAX-RS interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Selects the root resource class, invokes any configured JAX-RS request filters, and determines the method to invoke on the root resource. |
The inbound chain for a JAX-RS endpoint skips straight to the ServiceInvokerInInterceptor interceptor. No other interceptors will be invoked after the JAXRSInInterceptor.
Table 64.5, “Outbound JAX-RS interceptors” lists the interceptors added to a JAX-RS endpoint’s outbound message chain.
Table 64.5. Outbound JAX-RS interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Marshals the response into the proper format for transmission. |
64.3. Message bindings
SOAP
Table 64.6, “Inbound SOAP interceptors” lists the interceptors added to a endpoint’s inbound message chain when using the SOAP Binding.
Table 64.6. Inbound SOAP interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Checks if the message is a fault message. If the message is a fault message, normal processing is aborted and fault processing is started. |
|
|
| Processes the must understand headers. |
|
|
|
Unmarshals rpc/literal messages. If the message is bare, the message is passed to a |
|
|
| Parses the SOAP headers and stores them in the message object. |
|
|
| Parses the SOAP action header and attempts to find a unique operation for the action. |
|
|
| Binds the SOAP headers that map to operation parameters to the appropriate objects. |
|
|
|
Parses the mime headers for mime boundaries, finds the root part and resets the input stream to it, and stores the other parts in a collection of |
|
|
| Examines the first element in the SOAP body to determine the appropriate operation and calls the data binding to read in the data. |
|
|
|
Creates an |
|
|
| Handles the processing of HTTP GET methods. |
|
|
| Creates the required MIME handlers for binary SOAP attachments and adds the data to the parameter list. |
Table 64.7, “Outbound SOAP interceptors” lists the interceptors added to a endpoint’s outbound message chain when using the SOAP Binding.
Table 64.7. Outbound SOAP interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Marshals rpc style messages for transmission. |
|
|
| Removes all SOAP headers that are marked as inbound only. |
|
|
| Sets up the SOAP version and the SOAP action header. |
|
|
| Sets up the attachment marshalers and the mime stuff required to process any attachments that might be in the message. |
|
|
| Writes the message parts. |
|
|
|
Creates an |
|
|
| Wraps the outbound message parameters. |
|
|
|
Writes the |
|
|
| Removes any binary data that will be packaged as a SOAP attachment and stores it for later processing. |
XML
Table 64.8, “Inbound XML interceptors” lists the interceptors added to a endpoint’s inbound message chain when using the XML Binding.
Table 64.8. Inbound XML interceptors
| Class | Phase | Description |
|---|---|---|
|
|
|
Parses the mime headers for mime boundaries, finds the root part and resets the input stream to it, and then stores the other parts in a collection of |
|
|
| Examines the first element in the message body to determine the appropriate operation and then calls the data binding to read in the data. |
|
|
|
Creates an |
|
|
| Handles the processing of HTTP GET methods. |
|
|
| Unmarshals the XML message. |
Table 64.9, “Outbound XML interceptors” lists the interceptors added to a endpoint’s outbound message chain when using the XML Binding.
Table 64.9. Outbound XML interceptors
| Class | Phase | Description |
|---|---|---|
|
|
|
Creates an |
|
|
| Wraps the outbound message parameters. |
|
|
| Marshals the message for transmission. |
CORBA
Table 64.10, “Inbound CORBA interceptors” lists the interceptors added to a endpoint’s inbound message chain when using the CORBA Binding.
Table 64.10. Inbound CORBA interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Deserializes the CORBA message. |
|
|
| Deserializes the message parts. |
Table 64.11, “Outbound CORBA interceptors” lists the interceptors added to a endpoint’s outbound message chain when using the CORBA Binding.
Table 64.11. Outbound CORBA interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Serializes the message. |
|
|
| Writes the message parts. |
|
|
| Creates a streamable object for the message and stores it in the message context. |
64.4. Other features
Logging
Table 64.12, “Inbound logging interceptors” lists the interceptors added to a endpoint’s inbound message chain to support logging.
Table 64.12. Inbound logging interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Writes the raw message data to the logging system. |
Table 64.13, “Outbound logging interceptors” lists the interceptors added to a endpoint’s outbound message chain to support logging.
Table 64.13. Outbound logging interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Writes the outbound message to the logging system. |
For more information about logging see Chapter 19, Apache CXF Logging.
WS-Addressing
Table 64.14, “Inbound WS-Addressing interceptors” lists the interceptors added to a endpoint’s inbound message chain when using WS-Addressing.
Table 64.14. Inbound WS-Addressing interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Decodes the message addressing properties. |
Table 64.15, “Outbound WS-Addressing interceptors” lists the interceptors added to a endpoint’s outbound message chain when using WS-Addressing.
Table 64.15. Outbound WS-Addressing interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Aggregates the message addressing properties for a message. |
|
|
| Encodes the message addressing properties. |
For more information about WS-Addressing see Chapter 20, Deploying WS-Addressing.
WS-RM
WS-RM relies on WS-Addressing so all of the WS-Addressing interceptors will also be added to the interceptor chains.
Table 64.16, “Inbound WS-RM interceptors” lists the interceptors added to a endpoint’s inbound message chain when using WS-RM.
Table 64.16. Inbound WS-RM interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Handles the aggregation of message parts and acknowledgement messages. |
|
|
| Encodes and decodes the WS-RM properties from messages. |
Table 64.17, “Outbound WS-RM interceptors” lists the interceptors added to a endpoint’s outbound message chain when using WS-RM.
Table 64.17. Outbound WS-RM interceptors
| Class | Phase | Description |
|---|---|---|
|
|
| Handles the chunking of messages and the transmission of the chunks. Also handles the processing of acknowledgements and resend requests. |
|
|
| Encodes and decodes the WS-RM properties from messages. |
For more information about WS-RM see Chapter 21, Enabling Reliable Messaging.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.