public class MessageHelper extends Object
Constructor and Description |
---|
MessageHelper() |
Modifier and Type | Method and Description |
---|---|
static ArrayList<Object> |
cloneArrayList(ArrayList<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 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 will simulate cloning the message context and creating an exact copy of the
passed message.
|
static MessageContext |
cloneMessageContextForAggregateMediator(MessageContext synCtx) |
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 |
clonePartiallyForAggregate(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 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 Stack<TemplateContext> |
getClonedTemplateStack(Stack<TemplateContext> oriTemplateStack)
Get a clone of a Template Function stack
|
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 String |
maskURLPassword(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
synCtx
- - this will be cloned.cloneSoapEnvelope
- whether to clone the soap envelope.isCloneJson
- whether to clone the JSON payload.org.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.public static MessageContext cloneMessageContextForAggregateMediator(MessageContext synCtx) throws org.apache.axis2.AxisFault
org.apache.axis2.AxisFault
public static Stack<TemplateContext> getClonedTemplateStack(Stack<TemplateContext> oriTemplateStack)
oriTemplateStack
- original template function stack to be clonedpublic 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
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.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 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 clonePartiallyForAggregate(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 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
- Copyright © 2005–2019 Apache Software Foundation. All rights reserved.