camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maciej Prochniak (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAMEL-2122) XPath injection cannot handle expressions returning strings
Date Fri, 30 Oct 2009 09:54:52 GMT
XPath injection cannot handle expressions returning strings
-----------------------------------------------------------

                 Key: CAMEL-2122
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2122
             Project: Apache Camel
          Issue Type: Bug
    Affects Versions: 2.0.0
            Reporter: Maciej Prochniak
            Priority: Minor


trying to inject following:
public void insert(@XPath("concat('48','//node/msisdn/text())") String msisdn) { }

results in  Can not convert #STRING to a NodeList! exception.
The reason is that XPathAnnotationExpressionFactory uses 

XPathBuilder.xpath(xpath); -by default xpath is evaluated as nodeSet.
I think it would be nice to be able to define result type in annotation e.g.
@XPath(value = "concat('48','//node/msisdn/text())", resultType = String.class)

- the default would be NodeSet to be backward compatible

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message