Philipp Förmer created CXF-6957:
-----------------------------------

             Summary: JAX-RS: ExceptionMapper not called for Fault
                 Key: CXF-6957
                 URL: https://issues.apache.org/jira/browse/CXF-6957
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 3.1.6
            Reporter: Philipp Förmer


Hi,

let service be a cxf jax-rs based service which uses a cxf based soap proxy 
client to communicate with a soap service. If the cxf soap proxy client throws 
a org.apache.cxf.binding.soap.SoapFault, then the SoapFault is not delegated to 
the jax-rs ExceptionMapper chain, which is for me an unexpected behaviour.

As far as I can see this is caused by:

org.apache.cxf.service.invoker.AbstractInvoker.invoke(...), L: 123
* Rethrows exception directly without wrapping it into a fault, if exception is 
of type org.apache.cxf.interceptor.Fault. SoapFault is a subclass of Fault.

org.apache.cxf.jaxrs.JAXRSInvoker.handleFault, L:329
* Passes the cause of the fault to ExceptionUtils.convertFaultToResponse. The 
cause of the cxf SoapFault is null!

org.apache.cxf.jaxrs.utils.ExceptionUtils.convertFaultToResponse, L.65:
* Is called with null "ex" parameter and immediatley returns with null, so no 
exception mapper gets involved.

Thank you for your support and great project,
Philipp






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to