org.apache.cxf.binding.soap.saaj
Class SAAJOutInterceptor

java.lang.Object
  extended by org.apache.cxf.phase.AbstractPhaseInterceptor<SoapMessage>
      extended by org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor
          extended by org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor
All Implemented Interfaces:
SoapInterceptor, Interceptor<SoapMessage>, PhaseInterceptor<SoapMessage>

public class SAAJOutInterceptor
extends AbstractSoapInterceptor

Sets up the outgoing chain to build a SAAJ tree instead of writing directly to the output stream. First it will replace the XMLStreamWriter with one which writes to a SOAPMessage. Then it will add an interceptor at the end of the chain in the SEND phase which writes the resulting SOAPMessage.


Nested Class Summary
static class SAAJOutInterceptor.SAAJOutEndingInterceptor
           
 
Field Summary
static String ORIGINAL_XML_WRITER
           
 
Constructor Summary
SAAJOutInterceptor()
           
 
Method Summary
 javax.xml.soap.MessageFactory getFactory(SoapMessage message)
           
 void handleFault(SoapMessage message)
          Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.
 void handleMessage(SoapMessage message)
          Intercepts a message.
 
Methods inherited from class org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor
getFaultCodePrefix, getRoles, getUnderstoodHeaders, prepareStackTrace
 
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, isGET, isRequestor, setAfter, setBefore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORIGINAL_XML_WRITER

public static final String ORIGINAL_XML_WRITER
Constructor Detail

SAAJOutInterceptor

public SAAJOutInterceptor()
Method Detail

getFactory

public javax.xml.soap.MessageFactory getFactory(SoapMessage message)
                                         throws javax.xml.soap.SOAPException
Throws:
javax.xml.soap.SOAPException

handleMessage

public void handleMessage(SoapMessage message)
                   throws Fault
Description copied from interface: Interceptor
Intercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.

Throws:
Fault

handleFault

public void handleFault(SoapMessage message)
Description copied from interface: Interceptor
Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.

Specified by:
handleFault in interface Interceptor<SoapMessage>
Overrides:
handleFault in class AbstractPhaseInterceptor<SoapMessage>


Apache CXF