You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2011/06/11 15:59:59 UTC

[jira] [Created] (CAMEL-4090) Add support for setting resultType on Simple expressions

Add support for setting resultType on Simple expressions
--------------------------------------------------------

                 Key: CAMEL-4090
                 URL: https://issues.apache.org/jira/browse/CAMEL-4090
             Project: Camel
          Issue Type: New Feature
          Components: camel-core
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 2.8.0


When people are using the simple expression such as setting a header etc, they may want to control what the result type of the expression is. Suppose they want to set a boolean

{code:xml}
<setHeader headerName="foo">
  <simple>true</simple>
</setHeader>
{code}

What happens is that the type of the foo header will be a String as thats the default type from a simple expression.

We should add the resultType attribute which other expressions has such as XPath/XQuery etc.
Then you can do as follows:
{code:xml}
<setHeader headerName="foo">
  <simple resultType="java.lang.Boolean">true</simple>
</setHeader>
{code}

Likewise it should be possible in Java DSL.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-4090) Add support for setting resultType on Simple expressions

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-4090.
--------------------------------

    Resolution: Fixed

> Add support for setting resultType on Simple expressions
> --------------------------------------------------------
>
>                 Key: CAMEL-4090
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4090
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.8.0
>
>
> When people are using the simple expression such as setting a header etc, they may want to control what the result type of the expression is. Suppose they want to set a boolean
> {code:xml}
> <setHeader headerName="foo">
>   <simple>true</simple>
> </setHeader>
> {code}
> What happens is that the type of the foo header will be a String as thats the default type from a simple expression.
> We should add the resultType attribute which other expressions has such as XPath/XQuery etc.
> Then you can do as follows:
> {code:xml}
> <setHeader headerName="foo">
>   <simple resultType="java.lang.Boolean">true</simple>
> </setHeader>
> {code}
> Likewise it should be possible in Java DSL.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira