Stuart, I did a quick test with an XSL and could not find anything wrong with the XPath you're using. One thing you could try is putting //msgns:typePrintReprint to make sure it really finds the correct nodes, but if that doesn't work, we would like you to send us an simple SA that reproduces the issue (just replace the input with a file sender and add some samples files).
Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ 2009/7/24 Stuart Roe <[email protected]>: > Hi all, > > I have strange problem where EIP-content-based-router is miss routing a > message and I don't understand why. I'm hoping someone can enlighten me. > > Below I have included the message information at the origin, the appropriate > configuration of eip and the message as delivered. The problem I'm having is > that the message is being delivered to the wrong endpoint, > 'dispatch-set-param', when it should be going to 'reprint'. > > Why is the wrong selection predicate matching the message? > > I have included the default route to demonstrate that matching is occuring > and the wrong rule is being fired. > > Stuart. > > The message at origin: > Out Message:ID:192.168.1.11-122ac055cf3-3:0 > status:Active > role:javax.jbi.messaging.messageexchange$r...@11e8050 > service:{http://somedom.co.uk/jfv/routing}scanner-request > endpoint:null > in:StringSource[<?xml version="1.0" encoding="UTF-8"?> > <typePrintReprint xmlns="http://somedom.co.uk/jfv/messaging"> > <prevJobRef> > <ref>121</ref> > </prevJobRef> > <areaRef>1</areaRef> > </typePrintReprint>] > > EIP config: > <beans ... > xmlns:routing="http://somedom.co.uk/jfv/routing" > xmlns:ch="http://somedom.co.uk/jfv/configHandler" > ... > > > <eip:namespace-context id="nsContext"> > <eip:namespaces> > <eip:namespace > prefix="msgns">http://somedom.co.uk/jfv/messaging</eip:namespace> > </eip:namespaces> > </eip:namespace-context> > > <eip:content-based-router service="routing:scanner-request" > endpoint="endpoint"> > <eip:rules> > <eip:routing-rule> > <eip:predicate> > <eip:xpath-predicate xpath="count(/msgns:typeDispatchSetParamValue) = > 1" namespaceContext="#nsContext" /> > </eip:predicate> > <eip:target> > <eip:exchange-target service="ch:inbound" > endpoint="dispatch-set-param" /> > </eip:target> > </eip:routing-rule> > <eip:routing-rule> > <eip:predicate> > <eip:xpath-predicate xpath="count(/msgns:typePrintReprint) = 1" > namespaceContext="#nsContext" /> > </eip:predicate> > <eip:target> > <eip:exchange-target service="ch:inbound" endpoint="reprint" /> > </eip:target> > </eip:routing-rule> > <!-- FYI: Default target : > <eip:exchange-target service="ch:inbound" endpoint="request"/> > --> > </eip:rules> > </eip:content-based-router> > > Message delivered: > id: ID:192.168.1.11-122ac055cf3-4:1 > status: Active > role: provider > service: {http://somedom.co.uk/jfv/configHandler}inbound > endpoint: dispatch-set-param > in: <?xml version="1.0" encoding="UTF-8"?><typePrintReprint > xmlns="http://oviconline.co.uk/jfv/messaging"> > <prevJobRef> > <ref>121</ref> > </prevJobRef> > <areaRef>1</areaRef> > </typePrintReprint> > out: null > ] > > > > > > > > >
