[jira] Created: (CAMEL-746) Support setOutHeader in Spring DSL

View: New views
17 Messages — Rating Filter:   Alert me  

[jira] Created: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Support setOutHeader in Spring DSL
----------------------------------

                 Key: CAMEL-746
                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
             Project: Apache Camel
          Issue Type: Sub-task
          Components: camel-core, camel-spring
    Affects Versions: 1.4.0
            Reporter: Jonathan Anstey
             Fix For: 1.5.0




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


[jira] Updated: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey updated CAMEL-746:
----------------------------------

    Attachment: setOutHeaderType.patch

This patch adds support for setting the out header in the Spring DSL.

I've also made a few modifications to the setHeader DSL method:
  - Removed the SetHeaderProcessor because it was much cleaner to just use the ProcessorBuilder's version of this.
  - Removed the ability to have a child processor in the <setHeader> element. There is a good reason for this: (1) the Java DSL doesn't even support this, (2) its really not intuitive and no one IMO would want to use it! :)

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-746:
-----------------------------------

Jonathan, great patch.

I am wondering if we can improve the tag for the attribute only solution as below:
+      <setOutHeader headerName="theHeader" value="the value">
+        <expression/>        
+      </setOutHeader>

It requires the empty expression tag that is a bit confusing for end-users. Wold be great with:
+      <setOutHeader headerName="theHeader" value="the value"/>

But I guess its declare in the XSD file.

If not maybe we should not support the value attribute and force the child expression tag
+      <setOutHeader headerName="theHeader">
+        <constant>the value</constant>
+      </setOutHeader>



> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey commented on CAMEL-746:
---------------------------------------

Hey Claus, I'm not sure if we can support this format

<setOutHeader headerName="theHeader" value="the value"/>

because the XmlElementRef JAXB attribute cannot be set to optional (thus the expression node is mandatory)... I haven't looked at depth into this though. There may be another way around this.

I do like the second option however. I think the main bit there would be adding the 'constant' expression type to the Spring DSL as its not there currently. Shouldn't be too bad. I'll take a look tomorrow.

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch
>
>


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


[jira] Updated: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey updated CAMEL-746:
----------------------------------

    Attachment: setOutHeaderType.patch.2

I've switched things up a bit and now the setHeader/setOutHeader features use the following nicer syntax for constants:

{code:language=xml}
<route>
  <from uri="seda:a"/>
  <setOutHeader headerName="theHeader">
    <constant>the value</constant>
  </setOutHeader>
  <to uri="mock:b"/>    
</route>
{code}


> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Updated: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey updated CAMEL-746:
----------------------------------

    Patch Info: [Patch Available]

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Assigned: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen reassigned CAMEL-746:
---------------------------------

    Assignee: Claus Ibsen

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-746:
-----------------------------------

We must remember to update the wiki documentation with this new constant in the spring xml.

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey commented on CAMEL-746:
---------------------------------------

How about this?

http://cwiki.apache.org/confluence/display/CAMEL/Constant

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey commented on CAMEL-746:
---------------------------------------

I also added the link here http://cwiki.apache.org/confluence/display/CAMEL/Languages+Supported so it would show up elsewhere in the documentation.

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-746:
-----------------------------------

Very good. Could you state that constant language is in Camel 1.5.

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-746:
-----------------------------------

Applied patch. Thanks a lot Jonathan. Great work with the new constant language to not make the spring DSL confusing with the empty expression tags.

Committed revision 679483.

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey commented on CAMEL-746:
---------------------------------------

I've added the availability comment in the docs. I'm glad to see the empty expression tags go too :)

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Resolved: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen resolved CAMEL-746.
-------------------------------

    Resolution: Fixed

Again thanks a lot, its a great patch (as always from you)

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-746:
-----------------------------------

Jonathan, I assume the <constant> also works for the regular setHeader tag as well? If so I think we should add a sample with setHeader to the wiki as well. I do think setHeader is more used than setOutHeader.

If the regular setHeader has the value attribute also, we should probably @deprecated it, so we remember to remove it in Camel 2.0

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2
>
>


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


[jira] Updated: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Jonathan Anstey updated CAMEL-746:
----------------------------------

    Attachment: setOutHeaderType.patch.3

This patch deprecates the setHeader+value attribute DSL method and changes a bunch of usages so any snippets on the wiki will be updated. I've also added a little comment to the Camel 1.5 release notes so any users won't be surprised by this change.

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2, setOutHeaderType.patch.3
>
>


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


[jira] Commented: (CAMEL-746) Support setOutHeader in Spring DSL

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Claus Ibsen commented on CAMEL-746:
-----------------------------------

Applied patch no 3. Thanks.

> Support setOutHeader in Spring DSL
> ----------------------------------
>
>                 Key: CAMEL-746
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-746
>             Project: Apache Camel
>          Issue Type: Sub-task
>          Components: camel-core, camel-spring
>    Affects Versions: 1.4.0
>            Reporter: Jonathan Anstey
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>         Attachments: setOutHeaderType.patch, setOutHeaderType.patch.2, setOutHeaderType.patch.3
>
>


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

LightInTheBox - Buy quality products at wholesale price