Apache CXF API

org.apache.cxf.ws.rm.soap
Class RMSoapInterceptor

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.ws.rm.soap.RMSoapInterceptor
All Implemented Interfaces:
SoapInterceptor, Interceptor<SoapMessage>, PhaseInterceptor<SoapMessage>

public class RMSoapInterceptor
extends AbstractSoapInterceptor

Protocol Handler responsible for {en|de}coding the RM Properties for {outgo|incom}ing messages.


Field Summary
protected static javax.xml.bind.JAXBContext jaxbContext
           
 
Constructor Summary
RMSoapInterceptor()
          Constructor.
 
Method Summary
static
<T> T
decodeProperty(Class<T> clz, Element headerElement, javax.xml.bind.Unmarshaller unmarshaller)
          Decodes an RM property from a SOAP header.
static void encode(SoapMessage message, RMProperties rmps)
          Encode the current RM properties in protocol-specific headers.
static void encodeFault(SoapMessage message, SequenceFault sf)
          Encode the SeuqnceFault in protocol-specific header.
 Set<QName> getUnderstoodHeaders()
           
 void handleMessage(SoapMessage message)
          Intercepts a message.
 RMProperties unmarshalRMProperties(SoapMessage message)
          Decode the RM properties from protocol-specific headers.
 
Methods inherited from class org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor
getFaultCodePrefix, getRoles, prepareStackTrace
 
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cxf.interceptor.Interceptor
handleFault
 

Field Detail

jaxbContext

protected static javax.xml.bind.JAXBContext jaxbContext
Constructor Detail

RMSoapInterceptor

public RMSoapInterceptor()
Constructor.

Method Detail

getUnderstoodHeaders

public Set<QName> getUnderstoodHeaders()
Specified by:
getUnderstoodHeaders in interface SoapInterceptor
Overrides:
getUnderstoodHeaders in class AbstractSoapInterceptor
Returns:
the set of SOAP headers understood by this handler

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

encode

public static void encode(SoapMessage message,
                          RMProperties rmps)
Encode the current RM properties in protocol-specific headers.

Parameters:
message - the SOAP message.
rmps - the current RM properties.

encodeFault

public static void encodeFault(SoapMessage message,
                               SequenceFault sf)
Encode the SeuqnceFault in protocol-specific header.

Parameters:
message - the SOAP message.
sf - the SequenceFault.

unmarshalRMProperties

public RMProperties unmarshalRMProperties(SoapMessage message)
Decode the RM properties from protocol-specific headers.

Parameters:
message - the SOAP message
Returns:
the RM properties

decodeProperty

public static <T> T decodeProperty(Class<T> clz,
                                   Element headerElement,
                                   javax.xml.bind.Unmarshaller unmarshaller)
                        throws javax.xml.bind.JAXBException
Decodes an RM property from a SOAP header.

Parameters:
clz - the class
headerElement - the SOAP header element
marshaller - the JAXB marshaller to use
Returns:
the decoded EndpointReference
Throws:
javax.xml.bind.JAXBException

Apache CXF API

Apache CXF