public class MessageHelper extends Object
Constructor and Description |
---|
MessageHelper() |
Modifier and Type | Method and Description |
---|---|
static org.apache.axis2.context.MessageContext |
cloneAxis2MessageContext(org.apache.axis2.context.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 org.apache.axis2.client.Options |
cloneOptions(org.apache.axis2.client.Options options)
Clones the given
Options object. |
static org.apache.axis2.context.MessageContext |
clonePartially(org.apache.axis2.context.MessageContext ori) |
static org.apache.axiom.soap.SOAPEnvelope |
cloneSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)
This method will clone the provided SOAPEnvelope and returns the cloned envelope
as an exact copy of the provided envelope
|
static Map |
getClonedTransportHeaders(org.apache.axis2.context.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 org.apache.axiom.soap.SOAPEnvelope |
removeAddressingHeaders(org.apache.axis2.context.MessageContext axisMsgCtx)
Removes Submission and Final WS-Addressing headers and return the SOAPEnvelope from the given
message context
|
static void |
removeProcessedHeaders(org.apache.axis2.context.MessageContext axisMsgCtx,
boolean preserveAddressing)
Remove the headers that are marked as processed.
|
public static MessageContext cloneMessageContext(MessageContext synCtx) throws org.apache.axis2.AxisFault
synCtx
- - this will be clonedorg.apache.axis2.AxisFault
- if there is a failure in creating the new Synapse MC or in a failure in
cloning the underlying axis2 MessageContextcloneAxis2MessageContext(org.apache.axis2.context.MessageContext)
public static org.apache.axis2.context.MessageContext cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc) throws org.apache.axis2.AxisFault
mc
- - this will be cloned for getting an exact copyorg.apache.axis2.AxisFault
- if there is a failure in copying the certain attributes of the
provided message contextpublic static Map getClonedTransportHeaders(org.apache.axis2.context.MessageContext msgCtx)
public static org.apache.axis2.context.MessageContext clonePartially(org.apache.axis2.context.MessageContext ori) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
public static org.apache.axiom.soap.SOAPEnvelope cloneSOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)
envelope
- - this will be cloned to get the new envelopepublic static org.apache.axis2.client.Options cloneOptions(org.apache.axis2.client.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 objectpublic static org.apache.axiom.soap.SOAPEnvelope removeAddressingHeaders(org.apache.axis2.context.MessageContext axisMsgCtx)
axisMsgCtx
- the Axis2 Message contextpublic 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 requiredpublic static void removeProcessedHeaders(org.apache.axis2.context.MessageContext axisMsgCtx, boolean preserveAddressing)
axisMsgCtx
- the Axis2 Message contextpreserveAddressing
- if true preserve the addressing headersCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.