org.apache.synapse.mediators.eip
Class EIPUtils

java.lang.Object
  extended by org.apache.synapse.mediators.eip.EIPUtils

public class EIPUtils
extends Object

Utility methods for the EIP mediators


Constructor Summary
EIPUtils()
           
 
Method Summary
static void createSynapseEIPTemplateProperty(MessageContext synCtxt, String templateName, String paramName, Object value)
           
static void enrichEnvelope(SOAPEnvelope envelope, SOAPEnvelope enricher, MessageContext synCtxt, SynapseXPath expression)
          Merge two SOAP envelopes using the given XPath expression that specifies the element that enriches the first envelope from the second
static List<OMNode> getDetachedMatchingElements(SOAPEnvelope envelope, MessageContext synCtxt, SynapseXPath expression)
          Return the set of detached elements specified by the XPath over the given envelope
static List getMatchingElements(SOAPEnvelope envelope, MessageContext synCtxt, SynapseXPath expression)
          Return the set of elements specified by the XPath over the given envelope
static List getMatchingElements(SOAPEnvelope envelope, SynapseXPath expression)
          Return the set of elements specified by the XPath over the given envelope
static String getTemplatePropertyMapping(String templateName, String parameter)
          Util functions related to EIP Templates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EIPUtils

public EIPUtils()
Method Detail

getMatchingElements

public static List getMatchingElements(SOAPEnvelope envelope,
                                       SynapseXPath expression)
                                throws JaxenException
Return the set of elements specified by the XPath over the given envelope

Parameters:
envelope - SOAPEnvelope from which the elements will be extracted
expression - SynapseXPath expression describing the elements to be extracted
Returns:
List OMElements in the envelope matching the expression
Throws:
JaxenException - if the XPath expression evaluation fails

getMatchingElements

public static List getMatchingElements(SOAPEnvelope envelope,
                                       MessageContext synCtxt,
                                       SynapseXPath expression)
                                throws JaxenException
Return the set of elements specified by the XPath over the given envelope

Parameters:
envelope - SOAPEnvelope from which the elements will be extracted
expression - SynapseXPath expression describing the elements to be extracted
Returns:
List OMElements in the envelope matching the expression
Throws:
JaxenException - if the XPath expression evaluation fails

getDetachedMatchingElements

public static List<OMNode> getDetachedMatchingElements(SOAPEnvelope envelope,
                                                       MessageContext synCtxt,
                                                       SynapseXPath expression)
                                                throws JaxenException
Return the set of detached elements specified by the XPath over the given envelope

Parameters:
envelope - SOAPEnvelope from which the elements will be extracted
expression - SynapseXPath expression describing the elements to be extracted
Returns:
List detached OMElements in the envelope matching the expression
Throws:
JaxenException - if the XPath expression evaluation fails

enrichEnvelope

public static void enrichEnvelope(SOAPEnvelope envelope,
                                  SOAPEnvelope enricher,
                                  MessageContext synCtxt,
                                  SynapseXPath expression)
                           throws JaxenException
Merge two SOAP envelopes using the given XPath expression that specifies the element that enriches the first envelope from the second

Parameters:
envelope - SOAPEnvelope to be enriched with the content
enricher - SOAPEnvelope from which the enriching element will be extracted
expression - SynapseXPath describing the enriching element
Throws:
JaxenException - on failing of processing the xpath

getTemplatePropertyMapping

public static String getTemplatePropertyMapping(String templateName,
                                                String parameter)
Util functions related to EIP Templates


createSynapseEIPTemplateProperty

public static void createSynapseEIPTemplateProperty(MessageContext synCtxt,
                                                    String templateName,
                                                    String paramName,
                                                    Object value)


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