Class OutStreamSubstituteInterceptor

java.lang.Object
org.apache.cxf.phase.AbstractPhaseInterceptor<Message>
org.openehealth.ipf.commons.ihe.ws.cxf.payload.OutStreamSubstituteInterceptor
All Implemented Interfaces:
Interceptor<Message>, PhaseInterceptor<Message>

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

    • OutStreamSubstituteInterceptor

      public OutStreamSubstituteInterceptor()
  • Method Details

    • handleMessage

      public void handleMessage(Message message)
    • getStreamWrapper

      public static WrappedOutputStream getStreamWrapper(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.