You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Donatello Santoro (JIRA)" <ji...@apache.org> on 2008/01/21 15:47:36 UTC

[jira] Created: (CAMEL-302) Added support for the management of the Http headers

Added support for the management of the Http headers
----------------------------------------------------

                 Key: CAMEL-302
                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
             Project: Apache Camel
          Issue Type: New Feature
          Components: camel-http
    Affects Versions: 1.2.0
            Reporter: Donatello Santoro
            Priority: Minor
         Attachments: httpHeaderPatch.patch

The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.

Then, in a component of Camel it will be possible to write:

public void process(Exchange exchange) throws Exception {
    Map<String,String> headerHttpMap = new HashMap<String,String>();    
    exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
        
    headerHttpMap.put("SOAPAction", "testAction");
}

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


[jira] Resolved: (CAMEL-302) Added support for the management of the Http headers

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

Claus Ibsen resolved CAMEL-302.
-------------------------------

    Fix Version/s:     (was: 1.5.0)
       Resolution: Won't Fix

Please comment if you have any updates to this one, but currently we dont plan to do anything about this for camel 1.5

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42324#action_42324 ] 

Claus Ibsen commented on CAMEL-302:
-----------------------------------

And we would love a java snippet example how to exclude custom headers on the wiki component page ;)

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42322#action_42322 ] 

Claus Ibsen commented on CAMEL-302:
-----------------------------------

Roman we might need a addIgnoreHeader(key) for end users to easier adding their own headers to ignore instead of clearing the already default ignored ones.

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Roman Kalukiewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41123#action_41123 ] 

Roman Kalukiewicz commented on CAMEL-302:
-----------------------------------------

Could you look at the solution I made in CAMEL-254 and say if it is OK for you?
We could have also your solution implemented (as by default in CAMEL-254 I skip all headers that start with 'org.apache.camel') but I think it could be too much ;)
If it works for you, then lets close the issue.

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42331#action_42331 ] 

Claus Ibsen commented on CAMEL-302:
-----------------------------------

Donatello are ten information in your component specific to this component? Have you considered to store them on properties on the exchange itself and not on the in message itself. Properties on the exchange are ment for long lasting information.

See RomKals reponse in the thread:
http://www.nabble.com/WebLogic-JMS-request-to-EJB-method-to-JMS-response-td16688628s22882.html

However your request for a reverse strattegy is a valid use-case and a good idea to include in Camel if that really helps your situation.

So something like: 
{code}
setIncludeOnlyHeaders(Set<String> keys)
{code}

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Donatello Santoro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42328#action_42328 ] 

Donatello Santoro commented on CAMEL-302:
-----------------------------------------

Hi Claus. I have given a glance to the HttpBinding and I believe whether to add a list of headers to ignore is not a bad idea. But I think that perhaps the choice to say what to ignore is not winning in many cases. For example, in my case I use the map of the message to exchange about ten information among a component to the other, while I would be wanting to send as header http only "SOAPAction." 

Therefore instead of saying what to exclude is it would be better to say what to include is. Does thing think of it?

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42321#action_42321 ] 

Claus Ibsen commented on CAMEL-302:
-----------------------------------

HttpBinding has features to evaulate if a header should be included or not. Also you can set a list of headers to ignore etc.

Donatello please see if this is not sufficient for your needs. 

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Updated: (CAMEL-302) Added support for the management of the Http headers

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

Hadrian Zbarcea updated CAMEL-302:
----------------------------------

    Fix Version/s: 1.3.0

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>             Fix For: 1.3.0
>
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45446#action_45446 ] 

Claus Ibsen commented on CAMEL-302:
-----------------------------------

I dont think this use case is needed. 

Anyone have any thoughts of this one?

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>             Fix For: 1.5.0
>
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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


[jira] Commented: (CAMEL-302) Added support for the management of the Http headers

Posted by "Donatello Santoro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41144#action_41144 ] 

Donatello Santoro commented on CAMEL-302:
-----------------------------------------

In CAMEL-254 you add all headers except "org.apache.camel.component.http.query" in the HTTP Header. In this way it is more difficulty to exclude some headers. It is better perhaps to use a special map for these headings. Does thing think of it?

> Added support for the management of the Http headers
> ----------------------------------------------------
>
>                 Key: CAMEL-302
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-302
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-http
>    Affects Versions: 1.2.0
>            Reporter: Donatello Santoro
>            Priority: Minor
>         Attachments: httpHeaderPatch.patch
>
>
> The HttpProducer checks if in the map of the message there is the property named "org.apache.camel.component.http.header". This property must contain a map of String, that will be added to the header of the message Http.
> Then, in a component of Camel it will be possible to write:
> public void process(Exchange exchange) throws Exception {
>     Map<String,String> headerHttpMap = new HashMap<String,String>();    
>     exchange.getIn().setHeader("org.apache.camel.component.http.header", headerHttpMap);
>         
>     headerHttpMap.put("SOAPAction", "testAction");
> }

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