Package org.apache.synapse.util
Class MediatorPropertyUtils
- java.lang.Object
-
- org.apache.synapse.util.MediatorPropertyUtils
-
public class MediatorPropertyUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description MediatorPropertyUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
handleSpecialProperties(String propertyName, Object resultValue, org.apache.axis2.context.MessageContext axis2MessageCtx)
This method removes the current content-type header value from the Axis2 message context and set the given value.static boolean
isDynamicName(String nameValue)
Validate the given name to identify whether it is static or dynamic key If the name is in the {} format then it is dynamic key(XPath) Otherwise just a static namestatic void
serializeOMElement(org.apache.axis2.context.MessageContext msgCtx)
This method just serializes the OMElementstatic void
serializeOMElement(MessageContext msgCtx)
This method just serializes the OMElement, when setting a message type, we need to serialize to access the inner element.static void
updateSendToUrlForMockServices(EndpointDefinition endpoint, MessageContext synapseOutMessageContext, org.apache.axis2.context.MessageContext axisOutMsgCtx)
Updates the message context To address with mock URL if mock service exists in unit test mode.
-
-
-
Method Detail
-
handleSpecialProperties
public static void handleSpecialProperties(String propertyName, Object resultValue, org.apache.axis2.context.MessageContext axis2MessageCtx)
This method removes the current content-type header value from the Axis2 message context and set the given value.- Parameters:
propertyName
- Message type propertyresultValue
- Value to be setaxis2MessageCtx
- Axis2 message context
-
isDynamicName
public static boolean isDynamicName(String nameValue)
Validate the given name to identify whether it is static or dynamic key If the name is in the {} format then it is dynamic key(XPath) Otherwise just a static name- Parameters:
nameValue
- string to validate as a name- Returns:
- isDynamicName representing name type
-
serializeOMElement
public static void serializeOMElement(MessageContext msgCtx) throws XMLStreamException
This method just serializes the OMElement, when setting a message type, we need to serialize to access the inner element.- Parameters:
msgCtx
- Synapse MessageContext- Throws:
XMLStreamException
-
serializeOMElement
public static void serializeOMElement(org.apache.axis2.context.MessageContext msgCtx) throws XMLStreamException
This method just serializes the OMElement- Parameters:
msgCtx
- Synapse MessageContext- Throws:
XMLStreamException
-
updateSendToUrlForMockServices
public static void updateSendToUrlForMockServices(EndpointDefinition endpoint, MessageContext synapseOutMessageContext, org.apache.axis2.context.MessageContext axisOutMsgCtx)
Updates the message context To address with mock URL if mock service exists in unit test mode.- Parameters:
endpoint
- endpoint definitionsynapseOutMessageContext
- synapse message contextaxisOutMsgCtx
- axis2 message context
-
-