[jira] Created: (CAMEL-893) In XML route, <setHeader> element should not require children

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-893) In XML route, <setHeader> element should not require children

JIRA jira@apache.org
In XML route, <setHeader> element should not require children
-------------------------------------------------------------

                 Key: CAMEL-893
                 URL: https://issues.apache.org/activemq/browse/CAMEL-893
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 1.4.0
            Reporter: Aaron Mulder
             Fix For: 1.5.0


In the XML, you can use <setHeader headerName="foo" value="bar" /> but that is not valid -- it requires a child element like <el>, <groovy>, etc.  It doesn't seem like a child should be required if the "value" attribute is used (e.g. if you want to set a header to a constant value).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-893) In XML route, <setHeader> element should not require children

JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-893.
-------------------------------

      Assignee: Jonathan Anstey
    Resolution: Duplicate

Jonathan did some improvements already on this. See CAMEL-746.

<setHeader name="foo", value="bar"/> is @deprecated. You should use a <constant> child. See CAMEL-746 for sample.

> In XML route, <setHeader> element should not require children
> -------------------------------------------------------------
>
>                 Key: CAMEL-893
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-893
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Aaron Mulder
>            Assignee: Jonathan Anstey
>             Fix For: 1.5.0
>
>
> In the XML, you can use <setHeader headerName="foo" value="bar" /> but that is not valid -- it requires a child element like <el>, <groovy>, etc.  It doesn't seem like a child should be required if the "value" attribute is used (e.g. if you want to set a header to a constant value).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-893) In XML route, <setHeader> element should not require children

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45674#action_45674 ]

Jonathan Anstey commented on CAMEL-893:
---------------------------------------

The value attribute was removed after Camel 1.4 in favor of a constant expression as the child element. In Camel 1.5 you can do this:

{code}
      <setHeader headerName="foo">
        <constant>bar</constant>        
      </setHeader>
{code}

It should be alright to close this issue I think.

> In XML route, <setHeader> element should not require children
> -------------------------------------------------------------
>
>                 Key: CAMEL-893
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-893
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Aaron Mulder
>            Assignee: Jonathan Anstey
>             Fix For: 1.5.0
>
>
> In the XML, you can use <setHeader headerName="foo" value="bar" /> but that is not valid -- it requires a child element like <el>, <groovy>, etc.  It doesn't seem like a child should be required if the "value" attribute is used (e.g. if you want to set a header to a constant value).

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-893) In XML route, <setHeader> element should not require children

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45675#action_45675 ]

Jonathan Anstey commented on CAMEL-893:
---------------------------------------

Dang, you're fast Claus! ;)

> In XML route, <setHeader> element should not require children
> -------------------------------------------------------------
>
>                 Key: CAMEL-893
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-893
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Aaron Mulder
>            Assignee: Jonathan Anstey
>             Fix For: 1.5.0
>
>
> In the XML, you can use <setHeader headerName="foo" value="bar" /> but that is not valid -- it requires a child element like <el>, <groovy>, etc.  It doesn't seem like a child should be required if the "value" attribute is used (e.g. if you want to set a header to a constant value).

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