use of org.apache.synapse.util.xpath.ext.SynapseXpathVariableResolver in project wso2-synapse by wso2.
the class SynapseConfiguration method initXpathExtensions.
/**
* This method initializes Xpath Extensions available through synapse.properties file
* Xpath Extensions can be defined in Variable Context Extensions + Function Context Extensions
* synapse.xpath.var.extensions --> Variable Extensions
* synapse.xpath.func.extensions --> Function Extensions
*
* @param synapseEnvironment SynapseEnvironment
*/
private void initXpathExtensions(SynapseEnvironment synapseEnvironment) {
Axis2SynapseEnvironment axis2SynapseEnvironment = (Axis2SynapseEnvironment) synapseEnvironment;
/*Initialize Function Context extensions for xpath
*/
List<SynapseXpathFunctionContextProvider> functionExtensions = XpathExtensionUtil.getRegisteredFunctionExtensions();
for (SynapseXpathFunctionContextProvider functionExtension : functionExtensions) {
axis2SynapseEnvironment.setXpathFunctionExtensions(functionExtension);
}
/*Initialize Variable Context extensions for xpath
*/
List<SynapseXpathVariableResolver> variableExtensions = XpathExtensionUtil.getRegisteredVariableExtensions();
for (SynapseXpathVariableResolver variableExtension : variableExtensions) {
axis2SynapseEnvironment.setXpathVariableExtensions(variableExtension);
}
}
Aggregations