You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Maciej Prochniak (JIRA)" <ji...@apache.org> on 2009/10/30 10:54:52 UTC
[jira] Created: (CAMEL-2122) XPath injection cannot handle
expressions returning strings
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.
[jira] Assigned: (CAMEL-2122) XPath injection cannot handle
expressions returning strings
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-2122:
----------------------------------
Assignee: Claus Ibsen
> 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
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Maciej Prochniak
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: BeanWithXPathInjectionTest.java, CAMEL-2122.patch
>
>
> 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);
> and 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.
[jira] Updated: (CAMEL-2122) XPath injection cannot handle
expressions returning strings
Posted by "Maciej Prochniak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Prochniak updated CAMEL-2122:
------------------------------------
Description:
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);
and 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
was:
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
> 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);
> and 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.
[jira] Updated: (CAMEL-2122) XPath injection cannot handle
expressions returning strings
Posted by "Maciej Prochniak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Prochniak updated CAMEL-2122:
------------------------------------
Patch Info: [Patch Available]
> 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
> Attachments: BeanWithXPathInjectionTest.java, CAMEL-2122.patch
>
>
> 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);
> and 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.
[jira] Resolved: (CAMEL-2122) XPath injection cannot handle
expressions returning strings
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2122.
--------------------------------
Resolution: Fixed
Applied patch with thanks.
trunk: 831674
> 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
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Maciej Prochniak
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: BeanWithXPathInjectionTest.java, CAMEL-2122.patch
>
>
> 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);
> and 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.
[jira] Updated: (CAMEL-2122) XPath injection cannot handle
expressions returning strings
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-2122:
-------------------------------
Component/s: camel-core
Fix Version/s: 2.1.0
> 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
> Components: camel-core
> Affects Versions: 2.0.0
> Reporter: Maciej Prochniak
> Priority: Minor
> Fix For: 2.1.0
>
> Attachments: BeanWithXPathInjectionTest.java, CAMEL-2122.patch
>
>
> 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);
> and 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.
[jira] Updated: (CAMEL-2122) XPath injection cannot handle
expressions returning strings
Posted by "Maciej Prochniak (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Prochniak updated CAMEL-2122:
------------------------------------
Attachment: CAMEL-2122.patch
BeanWithXPathInjectionTest.java
Test case + patch
> 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
> Attachments: BeanWithXPathInjectionTest.java, CAMEL-2122.patch
>
>
> 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);
> and 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.