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

Missing StaxOutEndingInterceptor in OutFaultInterceptorChain leads to empty response

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 3.2.7
    • None
    • None
    • Unknown

    Description

      My OutInterceptorChain looks like this:

       

      ...
      pre-stream [SoapLoggingOutHandler, StaxOutInterceptor, XSLTOutInterceptor, AttachmentOutInterceptor]
      ...
      marshal [WrappedOutInterceptor, ExceptionInterceptor, BareOutInterceptor]
      ...
      pre-stream-ending [StaxOutEndingInterceptor]
      ...

      I'm using an XSLTOutInterceptor for XSLT transformations, which is called after the StaxOutInterceptor, so the XSLTOutInterceptor can use the XMLStreamWriter, provided by the StaxOutInterceptor.

      Additionally, the StaxOutInterceptor puts the StaxOutEndingInterceptor into the interceptor chain.

      This works fine if no interceptor throws an Exception in the handleMessage() method.

      In my scenario, the ExceptionInterceptor (in phase marshal) throws a RuntimeException. My FaultOutInterceptorChain looks than like this:

       

      ...
      pre-stream [SoapLoggingOutHandler, AttachmentOutInterceptor, StaxOutInterceptor]
      ...
      pre-stream-ending []
      ...
      

       

      The StaxOutEndingInterceptor is missing here which leads to an empty response because the StaxOutEndingInterceptor has to close the XMLStreamWriter.

      My current workaround is to invoke the XSLTOutInterceptor before the StaxOutInterceptor, so the XSLTOutInterceptor will use the OutputStream instead of the XMLStreamWriter.

      The complete interceptor chains are described in the "Environment" field.

      Attachments

        Activity

          People

            Unassigned Unassigned
            RoBeaToZ Robert Zilke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: