Package org.apache.synapse.util.xpath
Class SynapseXPathVariableContext
- java.lang.Object
-
- org.apache.synapse.util.xpath.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 Summary
Constructors Constructor Description SynapseXPathVariableContext(org.jaxen.VariableContext parent, org.apache.axiom.soap.SOAPEnvelope env)
Initializes theSynapseVariableContext
with the specified envelopeSynapseXPathVariableContext(org.jaxen.VariableContext parent, MessageContext synCtx)
Initializes theSynapseVariableContext
with the specified contextSynapseXPathVariableContext(org.jaxen.VariableContext parent, MessageContext synCtx, org.apache.axiom.soap.SOAPEnvelope env)
Initializes theSynapseVariableContext
with the specified envelope
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getVariableValue(String namespaceURI, String prefix, String localName)
Gets the variable values resolved from the context.
-
-
-
Constructor Detail
-
SynapseXPathVariableContext
public SynapseXPathVariableContext(org.jaxen.VariableContext parent, MessageContext synCtx)
Initializes the
SynapseVariableContext
with the specified context- Parameters:
parent
- the parent variable contextsynCtx
- 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 contextenv
- 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 contextsynCtx
- Synapse Message context to be initialized for the variable resolutionenv
- 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.
- ctx
- Prefix for Synapse MessageContext properties
- axis2
- Prefix for Axis2 MessageContext properties
- trp
- Prefix for the transport headers
- Specified by:
getVariableValue
in interfaceorg.jaxen.VariableContext
- Parameters:
namespaceURI
- namespaces for the variable resolutionprefix
- string prefix for the variable resolutionlocalName
- string local name for the variable resolution- Returns:
- Resolved variable value
- Throws:
org.jaxen.UnresolvableException
- if the variable specified does not found
-
-