This is problem we need to fix in the XPathExpression as we need to preserve compatibility imho. I've fixed some bug quite recently, but maybe it was not sufficent.
On Tue, May 13, 2008 at 2:57 PM, <[EMAIL PROTECTED]> wrote: > Author: tterm > Date: Tue May 13 05:57:38 2008 > New Revision: 655846 > > URL: http://svn.apache.org/viewvc?rev=655846&view=rev > Log: > SM-1352 content based router does not work anymore because of wrong evaluate > mode > > Modified: > > servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java > > Modified: > servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java > URL: > http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java?rev=655846&r1=655845&r2=655846&view=diff > > ============================================================================== > --- > servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java > (original) > +++ > servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java > Tue May 13 05:57:38 2008 > @@ -18,6 +18,7 @@ > > import javax.jbi.messaging.MessageExchange; > import javax.jbi.messaging.NormalizedMessage; > +import javax.xml.xpath.XPathConstants; > > import org.apache.commons.logging.Log; > import org.apache.commons.logging.LogFactory; > @@ -45,7 +46,7 @@ > public boolean matches(MessageExchange exchange) { > try { > NormalizedMessage in = exchange.getMessage("in"); > - Boolean match = (Boolean) evaluate(exchange, in); > + Boolean match = (Boolean) evaluate(exchange, in, > XPathConstants.BOOLEAN); > return Boolean.TRUE.equals(match); > } catch (Exception e) { > LOG.warn("Could not evaluate xpath expression", e); > > > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/
