synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Schmeling <>
Subject Synapse2: Question about XPath Expressions in SwitchMediator
Date Wed, 15 Dec 2010 11:22:11 GMT

I am using Apache Synapse 2.0-SNAPSHOT and I have a problem with XPATH

I have defined the following configuration:


which should be a a valid XPATH expression.

Synapse throws the following exception:

ERROR SynapseServer - Error starting Apache Synapse, trying a clean shutdown...
org.apache.synapse.SynapseException: Invalid XPath for attribute
'source' : {}searchFlights/{}destination
        at org.apache.synapse.config.xml.SwitchMediatorFactory.createSpecificMediator(
        at org.apache.synapse.config.xml.AbstractMediatorFactory.createMediator(

I've also looked at the code and saw that the SwitchMediatorFactory
directly calls new SynapseXPath(xpathAttrib.getAttributeValue()),
whereas in your test cases you are rather using the
SynapseXPath.parseXPathString(XPATHString) method which does some
preprocessing especially with namespaces. Wouldn't it be better to use
that method in the Switch MediatorFactory instead ?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message