Hi

Which version of Camel are you using?
Can you submit a simple test case to reproduce this error into the JIRA?
So we can dig the issue more quickly.

On 9/24/10 12:15 AM, [email protected] wrote:
Hi

I am currently evaluating Camel for use on a project.  I am having a problem 
with xpath filtering - which always returns false even if the xpath matches the 
inbound document.

So I have the following route definition:

public void configure() throws Exception {

from("jms:queue:TEST.QUEUE.SRH")
        .process(new Logger())
        .filter()
                .xpath("//par...@id='compression' or @id='TriOptima']")
                        .process(new Logger("after filter"))
        .choice()
                .when().xpath("//termination")
                        .process(new Logger("TERMINATION"))
                        .to("file:FOO")
                .when().xpath("/STPTradeML/FpML/trade")
                        .process(new Logger("NEW TRADE "))
                        .to("file:BAR")
                .otherwise()
                        .process(new Logger("otherwise "))
                        .to("file:LOGGER")
        .to("file:c://output.log");
}

Then I send in a message which matches the first xpath (tested in XML Spy).  
Tracking through the code shows that this results in an answer of false.

Are there any current known issues with xpath filtering?  Do I need to use 
namespaces, for example?

Any help or pointers you can provide would be welcome

Steve Hedges

_______________________________________________

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete it 
and any attachments and notify the sender that you have received it in error. 
Unless specifically indicated, this e-mail is not an offer to buy or sell or a 
solicitation to buy or sell any securities, investment products or other 
financial product or service, an official confirmation of any transaction, or 
an official statement of Barclays. Any views or opinions presented are solely 
those of the author and do not necessarily represent those of Barclays. This 
e-mail is subject to terms available at the following link: 
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the 
foregoing.  Barclays Capital is the investment banking division of Barclays 
Bank PLC, a company registered in England (number 1026167) with its registered 
off
ice at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent 
from other members of the Barclays Group.
_______________________________________________



--
Willem
----------------------------------
Apache Camel, Apache CXF committer
Open Source Integration: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: http://twitter.com/willemjiang

Reply via email to