Class OutStreamSubstituteInterceptor

  • All Implemented Interfaces:
    org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>, org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

    public class OutStreamSubstituteInterceptor
    extends org.apache.cxf.phase.AbstractPhaseInterceptor<org.apache.cxf.message.Message>
    CXF interceptor that substitutes message output stream with a special wrapper that collects SOAP payload.
    Author:
    Dmytro Rud
    • Constructor Detail

      • OutStreamSubstituteInterceptor

        public OutStreamSubstituteInterceptor()
    • Method Detail

      • handleMessage

        public void handleMessage​(org.apache.cxf.message.Message message)
      • getStreamWrapper

        public static WrappedOutputStream getStreamWrapper​(org.apache.cxf.message.Message message)
        Retrieves the instance of stream wrapper installed by this interceptor.
        Parameters:
        message - CXF message which contains output stream as one of content types.
        Returns:
        an instance of WrappedOutputStream.
        Throws:
        IllegalStateException - when the stream wrapper instance could not be retrieved.