|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.util.MessageHelper
public class MessageHelper
Constructor Summary | |
---|---|
MessageHelper()
|
Method Summary | |
---|---|
static MessageContext |
cloneAxis2MessageContext(MessageContext mc)
This method will simulate cloning the message context and creating an exact copy of the passed message. |
static MessageContext |
cloneMessageContext(MessageContext synCtx)
This method will simulate cloning the message context and creating an exact copy of the passed message. |
static Options |
cloneOptions(Options options)
Clones the given Options object. |
static MessageContext |
clonePartially(MessageContext ori)
|
static SOAPEnvelope |
cloneSOAPEnvelope(SOAPEnvelope envelope)
This method will clone the provided SOAPEnvelope and returns the cloned envelope as an exact copy of the provided envelope |
static SOAPFault |
cloneSOAPFault(SOAPFault fault)
Clones the SOAPFault, fault cloning is not the same as cloning the OMElement because if the Fault is accessed through the SOAPEnvelope.getBody().getFault() method it will lead to a class cast because the cloned element is just an OMElement but not a Fault. |
static Map |
getClonedTransportHeaders(MessageContext msgCtx)
|
static org.apache.neethi.Policy |
getPolicy(MessageContext synCtx,
String propertyKey)
Get the Policy object for the given name from the Synapse configuration at runtime |
static SOAPEnvelope |
removeAddressingHeaders(MessageContext axisMsgCtx)
Removes Submission and Final WS-Addressing headers and return the SOAPEnvelope from the given message context |
static void |
removeProcessedHeaders(MessageContext axisMsgCtx,
boolean preserveAddressing)
Remove the headers that are marked as processed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageHelper()
Method Detail |
---|
public static MessageContext cloneMessageContext(MessageContext synCtx) throws AxisFault
synCtx
- - this will be cloned
AxisFault
- if there is a failure in creating the new Synapse MC or in a failure in
clonning the underlying axis2 MessageContextcloneAxis2MessageContext(org.apache.axis2.context.MessageContext)
public static MessageContext cloneAxis2MessageContext(MessageContext mc) throws AxisFault
mc
- - this will be cloned for getting an exact copy
AxisFault
- if there is a failure in copying the certain attributes of the
provided message contextpublic static Map getClonedTransportHeaders(MessageContext msgCtx)
public static MessageContext clonePartially(MessageContext ori) throws AxisFault
AxisFault
public static SOAPEnvelope cloneSOAPEnvelope(SOAPEnvelope envelope)
envelope
- - this will be cloned to get the new envelope
public static Options cloneOptions(Options options)
Options
object. This is not a deep copy
because this will be called for each and every message going out from synapse. The parent
of the cloning options object is kept as a reference.
options
- cloning object
public static SOAPEnvelope removeAddressingHeaders(MessageContext axisMsgCtx)
axisMsgCtx
- the Axis2 Message context
public static org.apache.neethi.Policy getPolicy(MessageContext synCtx, String propertyKey)
synCtx
- the current synapse configuration to get to the synapse configurationpropertyKey
- the name of the property which holds the Policy required
public static SOAPFault cloneSOAPFault(SOAPFault fault)
fault
- that needs to be cloned
public static void removeProcessedHeaders(MessageContext axisMsgCtx, boolean preserveAddressing)
axisMsgCtx
- the Axis2 Message contextpreserveAddressing
- if true preserve the addressing headers
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |