org.apache.synapse.util.xpath
Class SynapseXPathVariableContext

java.lang.Object
  extended by org.apache.synapse.util.xpath.SynapseXPathVariableContext
All Implemented Interfaces:
VariableContext

public class SynapseXPathVariableContext
extends Object
implements 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
SynapseXPathVariableContext(VariableContext parent, MessageContext synCtx)
          Initializes the SynapseVariableContext with the specified context
SynapseXPathVariableContext(VariableContext parent, MessageContext synCtx, SOAPEnvelope env)
          Initializes the SynapseVariableContext with the specified envelope
SynapseXPathVariableContext(VariableContext parent, SOAPEnvelope env)
          Initializes the SynapseVariableContext with the specified envelope
 
Method Summary
 Object getVariableValue(String namespaceURI, String prefix, String localName)
          Gets the variable values resolved from the context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynapseXPathVariableContext

public SynapseXPathVariableContext(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(VariableContext parent,
                                   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(VariableContext parent,
                                   MessageContext synCtx,
                                   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 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 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:
UnresolvableException - if the variable specified does not found


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.