public class MessageHelper
extends java.lang.Object
Constructor and Description |
---|
MessageHelper() |
Modifier and Type | Method and Description |
---|---|
static java.util.ArrayList<java.lang.Object> |
cloneArrayList(java.util.ArrayList<java.lang.Object> arrayList) |
static org.apache.axis2.context.MessageContext |
cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc)
This method does exactly what
cloneAxis2MessageContext(org.apache.axis2.context.MessageContext) does,
other than cloning the SOAP envelop based on the cloneSOAPEnvelope argument. |
static org.apache.axis2.context.MessageContext |
cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc,
boolean cloneSoapEnvelope) |
static org.apache.axis2.context.MessageContext |
cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc,
boolean cloneSoapEnvelope,
boolean isCloneJson)
This method is similar to
cloneMessageContext(MessageContext, boolean, boolean, boolean, boolean)
In order to refactor the code, new method signature was created and this method calls the new method |
static org.apache.axis2.context.MessageContext |
cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc,
boolean cloneSoapEnvelope,
boolean isCloneJson,
boolean isAggregrate)
This method will simulate cloning the message context and creating an exact copy of the
passed message.
|
static MessageContext |
cloneMessageContext(MessageContext synCtx)
This method does exactly what
cloneMessageContext(MessageContext) does,
other than cloning the SOAP envelop based on the cloneSOAPEnvelope argument. |
static MessageContext |
cloneMessageContext(MessageContext synCtx,
boolean cloneSoapEnvelope) |
static MessageContext |
cloneMessageContext(MessageContext synCtx,
boolean cloneSoapEnvelope,
boolean isCloneJson)
This method is similar to
cloneMessageContext(MessageContext, boolean, boolean, boolean, boolean)
In order to refactor the code, new method signature was created and this method calls the new method |
static MessageContext |
cloneMessageContext(MessageContext synCtx,
boolean cloneSoapEnvelope,
boolean isCloneJson,
boolean isAggregate)
This method is similar to
cloneMessageContext(MessageContext, boolean, boolean, boolean, boolean)
other than always generating seperate correlation ids for the cloned message contexts |
static MessageContext |
cloneMessageContext(MessageContext synCtx,
boolean cloneSoapEnvelope,
boolean isCloneJson,
boolean isAggregate,
boolean isCloneCorrelationId)
This method will simulate cloning the message context and creating an exact copy of the
passed message.
|
static MessageContext |
cloneMessageContextForAggregateMediator(MessageContext synCtx)
Deprecated.
|
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.axis2.context.MessageContext |
clonePartially(org.apache.axis2.context.MessageContext ori,
boolean isAggregate) |
static org.apache.axis2.context.MessageContext |
clonePartiallyForAggregate(org.apache.axis2.context.MessageContext ori)
Deprecated.
|
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 org.apache.axiom.soap.SOAPFault |
cloneSOAPFault(org.apache.axiom.soap.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 java.util.Stack<TemplateContext> |
getClonedTemplateStack(java.util.Stack<TemplateContext> oriTemplateStack)
Get a clone of a Template Function stack
|
static java.util.Map |
getClonedTransportHeaders(org.apache.axis2.context.MessageContext msgCtx) |
static org.apache.neethi.Policy |
getPolicy(MessageContext synCtx,
java.lang.String propertyKey)
Get the Policy object for the given name from the Synapse configuration at runtime
|
static java.lang.String |
maskURLPassword(java.lang.String url)
Mask the password of the connection url with ***
|
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.
|
static void |
setWireLogHolderProperties(MessageContext synCtx,
boolean isBreakPoint,
SynapseMediationFlowPoint mediationFlowPoint)
This method is to set mediatorId property to axis2 message context.
|
public static MessageContext cloneMessageContext(MessageContext synCtx, boolean cloneSoapEnvelope) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
public static MessageContext cloneMessageContext(MessageContext synCtx, boolean cloneSoapEnvelope, boolean isCloneJson) throws org.apache.axis2.AxisFault
cloneMessageContext(MessageContext, boolean, boolean, boolean, boolean)
In order to refactor the code, new method signature was created and this method calls the new methodsynCtx
- Synapse MessageContext which has to be clonedcloneSoapEnvelope
- The flag to say whether to clone the SOAP envelope or not.isCloneJson
- The flag to say whether to clone the JSON payload or not.org.apache.axis2.AxisFault
- if there is a failure in creating the new Synapse MC or in a failure in
cloning the underlying axis2 MessageContext.public static MessageContext cloneMessageContext(MessageContext synCtx, boolean cloneSoapEnvelope, boolean isCloneJson, boolean isAggregate) throws org.apache.axis2.AxisFault
cloneMessageContext(MessageContext, boolean, boolean, boolean, boolean)
other than always generating seperate correlation ids for the cloned message contextssynCtx
- Synapse MessageContext which has to be clonedcloneSoapEnvelope
- The flag to say whether to clone the SOAP envelope or not.isCloneJson
- The flag to say whether to clone the JSON payload or not.isAggregate
- whether this method is called inside aggregate mediatororg.apache.axis2.AxisFault
- if there is a failure in creating the new Synapse MC or in a failure in
cloning the underlying axis2 MessageContext.public static MessageContext cloneMessageContext(MessageContext synCtx, boolean cloneSoapEnvelope, boolean isCloneJson, boolean isAggregate, boolean isCloneCorrelationId) throws org.apache.axis2.AxisFault
synCtx
- - this will be cloned.cloneSoapEnvelope
- whether to clone the soap envelope.isCloneJson
- whether to clone the JSON payload.isAggregate
- whether this method is called inside aggregate mediatorisCloneCorrelationId
- whether to generate correlation id for the cloned messageorg.apache.axis2.AxisFault
- if there is a failure in creating the new Synapse MC or in a failure in
clonning the underlying axis2 MessageContext.cloneAxis2MessageContext(org.apache.axis2.context.MessageContext, boolean)
public static MessageContext cloneMessageContext(MessageContext synCtx) throws org.apache.axis2.AxisFault
cloneMessageContext(MessageContext)
does,
other than cloning the SOAP envelop based on the cloneSOAPEnvelope
argument.synCtx
- Synapse message context to be cloned.org.apache.axis2.AxisFault
- If something goes wrong with message cloning.@Deprecated public static MessageContext cloneMessageContextForAggregateMediator(MessageContext synCtx) throws org.apache.axis2.AxisFault
cloneMessageContext(MessageContext, boolean, boolean, boolean, boolean)
with the isAggregate flag set to truesynCtx
- Synapse message context to be cloned.org.apache.axis2.AxisFault
- If something goes wrong with message cloning.public static java.util.Stack<TemplateContext> getClonedTemplateStack(java.util.Stack<TemplateContext> oriTemplateStack)
oriTemplateStack
- original template function stack to be clonedpublic static java.util.ArrayList<java.lang.Object> cloneArrayList(java.util.ArrayList<java.lang.Object> arrayList)
public static org.apache.axis2.context.MessageContext cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc, boolean cloneSoapEnvelope) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
public static org.apache.axis2.context.MessageContext cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc, boolean cloneSoapEnvelope, boolean isCloneJson) throws org.apache.axis2.AxisFault
cloneMessageContext(MessageContext, boolean, boolean, boolean, boolean)
In order to refactor the code, new method signature was created and this method calls the new methodmc
- Axis2 message contextcloneSoapEnvelope
- The flag to say whether to clone the SOAP envelope or not.isCloneJson
- The flag to say whether to clone the JSON payload or not.org.apache.axis2.AxisFault
- If something goes wrong during cloning.public static org.apache.axis2.context.MessageContext cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc, boolean cloneSoapEnvelope, boolean isCloneJson, boolean isAggregrate) throws org.apache.axis2.AxisFault
mc
- - this will be cloned for getting an exact copycloneSoapEnvelope
- The flag to say whether to clone the SOAP envelope or not.isCloneJson
- The flag to say whether to clone the JSON payload or not.isAggregrate
- The flag to say whether it is called inside aggregate mediator.org.apache.axis2.AxisFault
- if there is a failure in copying the certain attributes of the
provided message contextpublic static org.apache.axis2.context.MessageContext cloneAxis2MessageContext(org.apache.axis2.context.MessageContext mc) throws org.apache.axis2.AxisFault
cloneAxis2MessageContext(org.apache.axis2.context.MessageContext)
does,
other than cloning the SOAP envelop based on the cloneSOAPEnvelope
argument.mc
- Axis2 message contextorg.apache.axis2.AxisFault
- If something goes wrong during cloning.public static java.util.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.axis2.context.MessageContext clonePartially(org.apache.axis2.context.MessageContext ori, boolean isAggregate) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
@Deprecated public static org.apache.axis2.context.MessageContext clonePartiallyForAggregate(org.apache.axis2.context.MessageContext ori) throws org.apache.axis2.AxisFault
clonePartially(org.apache.axis2.context.MessageContext, boolean)
with the isAggregate flag trueorg.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, java.lang.String propertyKey)
synCtx
- the current synapse configuration to get to the synapse configurationpropertyKey
- the name of the property which holds the Policy requiredpublic static org.apache.axiom.soap.SOAPFault cloneSOAPFault(org.apache.axiom.soap.SOAPFault fault)
fault
- that needs to be clonedpublic static void removeProcessedHeaders(org.apache.axis2.context.MessageContext axisMsgCtx, boolean preserveAddressing)
axisMsgCtx
- the Axis2 Message contextpreserveAddressing
- if true preserve the addressing headerspublic static void setWireLogHolderProperties(MessageContext synCtx, boolean isBreakPoint, SynapseMediationFlowPoint mediationFlowPoint)
synCtx
- public static java.lang.String maskURLPassword(java.lang.String url)
url
- the actual urlCopyright © 2005-2020 Apache Software Foundation. All Rights Reserved.