Class MediatorPropertyUtils


  • public class MediatorPropertyUtils
    extends Object
    • Constructor Detail

      • MediatorPropertyUtils

        public MediatorPropertyUtils()
    • 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 property
        resultValue - Value to be set
        axis2MessageCtx - 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 definition
        synapseOutMessageContext - synapse message context
        axisOutMsgCtx - axis2 message context