Class SynapseXPathVariableContext

  • All Implemented Interfaces:
    org.jaxen.VariableContext

    public class SynapseXPathVariableContext
    extends Object
    implements org.jaxen.VariableContext
    Jaxen variable context for the XPath variables implicitly exposed by Synapse. It exposes the following variables:
    body
    The SOAP 1.1 or 1.2 body element.
    header
    The SOAP 1.1 or 1.2 header element.
    • Constructor Detail

      • SynapseXPathVariableContext

        public SynapseXPathVariableContext​(org.jaxen.VariableContext parent,
                                           MessageContext synCtx)

        Initializes the SynapseVariableContext with the specified context

        Parameters:
        parent - the parent variable context
        synCtx - context to be initialized for the variable resolution
      • SynapseXPathVariableContext

        public SynapseXPathVariableContext​(org.jaxen.VariableContext parent,
                                           org.apache.axiom.soap.SOAPEnvelope env)

        Initializes the SynapseVariableContext with the specified envelope

        Parameters:
        parent - the parent variable context
        env - envelope to be initialized for the variable resolution
      • SynapseXPathVariableContext

        public SynapseXPathVariableContext​(org.jaxen.VariableContext parent,
                                           MessageContext synCtx,
                                           org.apache.axiom.soap.SOAPEnvelope env)

        Initializes the SynapseVariableContext with the specified envelope

        Parameters:
        parent - the parent variable context
        synCtx - Synapse Message context to be initialized for the variable resolution
        env - envelope to be initialized for the variable resolution
    • Method Detail

      • getVariableValue

        public Object getVariableValue​(String namespaceURI,
                                       String prefix,
                                       String localName)
                                throws org.jaxen.UnresolvableException
        Gets the variable values resolved from the context. This includes the
        body
        The SOAP 1.1 or 1.2 body element.
        header
        The SOAP 1.1 or 1.2 header element.
        and the following variable prefixes
        ctx
        Prefix for Synapse MessageContext properties
        axis2
        Prefix for Axis2 MessageContext properties
        trp
        Prefix for the transport headers
        If the variable is unknown, this method attempts to resolve it using the parent variable context.
        Specified by:
        getVariableValue in interface org.jaxen.VariableContext
        Parameters:
        namespaceURI - namespaces for the variable resolution
        prefix - string prefix for the variable resolution
        localName - string local name for the variable resolution
        Returns:
        Resolved variable value
        Throws:
        org.jaxen.UnresolvableException - if the variable specified does not found