Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6957

JAX-RS: ExceptionMapper not called for Fault

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.6
    • 3.0.10, 3.1.7, 3.2.0
    • JAX-RS
    • None
    • Unknown

    Description

      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

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            pfoermer Philipp Förmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: