You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by attilav <dz...@freemail.hu> on 2010/05/20 14:49:26 UTC

camel-http converts headers to lower case

Hi everyone,

I'm trying to use the camel-http to send a soap request, however the camel
exchange headers get converted to lowercase during the http post. Is this a
feature, or bug? Is there a way around it?

My setup is something like this:

from("activemq:queue:tempque")
      .setHeader(Exchange.HTTP_METHOD,
constant(org.apache.camel.component.http.HttpMethods.POST))
      .setHeader("SOAPAction", constant("http://xxx.com/interfaces/ticket"))
      .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
      .setHeader("myHeaDer", constant("akarmi head"))
      .setHeader("xxxSOAPAction", constant("sakarmi head"))
      .to("http://iface.intra:8115/ticket")

what actually gets sent over the wire is:

POST /fault_ticket HTTP/1.1
myheader: akarmi head
soapaction: "http://xxx.com/interfaces/ticket"
xxxsoapaction: sakarmi head
User-Agent: Jakarta Commons-HttpClient/3.1
Host: iface.nrps.telekom.intra:8115
Content-Length: 1056
Content-Type: text/xml; charset=utf-8

<soap:Envelope  ....

The remote side is case sensitive on http headers, and complies about an
invalid soap action.

Thanks
attilav
-- 
View this message in context: http://old.nabble.com/camel-http-converts-headers-to-lower-case-tp28620717p28620717.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-http converts headers to lower case

Posted by Willem Jiang <wi...@gmail.com>.
As the fix is on the HttpProducer side, I'm afraid you need a customer 
HttpProducer to work around that issue.

Willem


Claus Ibsen wrote:
> Hi
> 
> Use a custom HttpBinding as a work around
> 
> 
> On Thu, May 20, 2010 at 4:20 PM, Willem Jiang <wi...@gmail.com> wrote:
>> Hi attilav
>>
>> I'm afraid there is no workaround :(
>> As we just cut the camel 2.3.0, I don't think this issue is a blocker issue
>> of Camel, so I marked the JIRA to be resolve in camel 2.4.0.
>>
>> Maybe you can use the Fuse camel 2.3.0, which will come out in an month, if
>> you can't wait for the Camel 2.4.0 release.
>>
>> Willem
>>
>>
>>
>> attilav wrote:
>>> thnx,  so no workaround until 2.4 :(
>>> attilav
>>>
>>>
>>> willem.jiang wrote:
>>>> Oh, I found the key, it's a bug of camel-http.
>>>> Current message header is using CaseInsensitiveMap[1] to store the header
>>>> key and value.
>>>>
>>>> And the HttpProducer should use the map.entrySet() to access the value
>>>> instead of use map.getKeySet() to go through the headers.
>>>>
>>>> I already create a JIRA[2] for it.
>>>>
>>>>
>>>> [1]https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
>>>>
>>>> [2]https://issues.apache.org/activemq/browse/CAMEL-2743
>>>>
>>>> Willem
>>>>
>>>>
>>>> attilav wrote:
>>>>> Some more info I found:
>>>>>
>>>>> After the http request the camel exchange headers
>>>>> (exchange.getIn().getHeaders()) seem to be OK, that is, the headers are
>>>>> copied correctly from the in message, and the http response headers are
>>>>> added too.
>>>>>
>>>>> 2010-05-20 13:29:46,502 | INFO  | xINH
>>>>> VVVVVVVVVVVVVVV{CamelHttpMethod=POST,
>>>>> myHeaDer=akarmi head, Content-Length=1003, xxxSOAPAction=sakarmi head,
>>>>> Expires=0, Cache-Control=private, pre-check=0, post-check=0, max-age=0,
>>>>> Pragma=no-cache, Server=MX/WEBSERVICE 3.X, Content-Type=text/xml;
>>>>> charset=UTF-8, CamelHttpResponseCode=500,
>>>>> SOAPAction="http://xxx.com/interfaces/ticket", Connection=close}
>>>>>
>>>>> br,
>>>>> attila
>>>>>
>>>>>
>>>>> attilav wrote:
>>>>>> Hi Willem,
>>>>>>
>>>>>> I'm using camel 2.2.0 - within servicemix 3.3.
>>>>>>
>>>>>> thanks for the quick answer,
>>>>>> attilav
>>>>>>
>>>>>>
>>>>>> willem.jiang wrote:
>>>>>>> Hi
>>>>>>>
>>>>>>> Which Camel version are you using?
>>>>>>> I just checked the camel trunk code, there is no code which turn the
>>>>>>> headers into lower case.
>>>>>>>
>>>>>>> Willem
>>>>>>>
>>>>>>> attilav wrote:
>>>>>>>> Hi everyone,
>>>>>>>>
>>>>>>>> I'm trying to use the camel-http to send a soap request, however the
>>>>>>>> camel
>>>>>>>> exchange headers get converted to lowercase during the http post. Is
>>>>>>>> this a
>>>>>>>> feature, or bug? Is there a way around it?
>>>>>>>>
>>>>>>>> My setup is something like this:
>>>>>>>>
>>>>>>>> from("activemq:queue:tempque")
>>>>>>>>      .setHeader(Exchange.HTTP_METHOD,
>>>>>>>> constant(org.apache.camel.component.http.HttpMethods.POST))
>>>>>>>>      .setHeader("SOAPAction",
>>>>>>>> constant("http://xxx.com/interfaces/ticket"))
>>>>>>>>      .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>>>>>>>>      .setHeader("myHeaDer", constant("akarmi head"))
>>>>>>>>      .setHeader("xxxSOAPAction", constant("sakarmi head"))
>>>>>>>>      .to("http://iface.intra:8115/ticket")
>>>>>>>>
>>>>>>>> what actually gets sent over the wire is:
>>>>>>>>
>>>>>>>> POST /fault_ticket HTTP/1.1
>>>>>>>> myheader: akarmi head
>>>>>>>> soapaction: "http://xxx.com/interfaces/ticket"
>>>>>>>> xxxsoapaction: sakarmi head
>>>>>>>> User-Agent: Jakarta Commons-HttpClient/3.1
>>>>>>>> Host: iface.nrps.telekom.intra:8115
>>>>>>>> Content-Length: 1056
>>>>>>>> Content-Type: text/xml; charset=utf-8
>>>>>>>>
>>>>>>>> <soap:Envelope  ....
>>>>>>>>
>>>>>>>> The remote side is case sensitive on http headers, and complies about
>>>>>>>> an
>>>>>>>> invalid soap action.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> attilav
>>>>
>>
> 
> 
> 


Re: camel-http converts headers to lower case

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Use a custom HttpBinding as a work around


On Thu, May 20, 2010 at 4:20 PM, Willem Jiang <wi...@gmail.com> wrote:
> Hi attilav
>
> I'm afraid there is no workaround :(
> As we just cut the camel 2.3.0, I don't think this issue is a blocker issue
> of Camel, so I marked the JIRA to be resolve in camel 2.4.0.
>
> Maybe you can use the Fuse camel 2.3.0, which will come out in an month, if
> you can't wait for the Camel 2.4.0 release.
>
> Willem
>
>
>
> attilav wrote:
>>
>> thnx,  so no workaround until 2.4 :(
>> attilav
>>
>>
>> willem.jiang wrote:
>>>
>>> Oh, I found the key, it's a bug of camel-http.
>>> Current message header is using CaseInsensitiveMap[1] to store the header
>>> key and value.
>>>
>>> And the HttpProducer should use the map.entrySet() to access the value
>>> instead of use map.getKeySet() to go through the headers.
>>>
>>> I already create a JIRA[2] for it.
>>>
>>>
>>> [1]https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
>>>
>>> [2]https://issues.apache.org/activemq/browse/CAMEL-2743
>>>
>>> Willem
>>>
>>>
>>> attilav wrote:
>>>>
>>>> Some more info I found:
>>>>
>>>> After the http request the camel exchange headers
>>>> (exchange.getIn().getHeaders()) seem to be OK, that is, the headers are
>>>> copied correctly from the in message, and the http response headers are
>>>> added too.
>>>>
>>>> 2010-05-20 13:29:46,502 | INFO  | xINH
>>>> VVVVVVVVVVVVVVV{CamelHttpMethod=POST,
>>>> myHeaDer=akarmi head, Content-Length=1003, xxxSOAPAction=sakarmi head,
>>>> Expires=0, Cache-Control=private, pre-check=0, post-check=0, max-age=0,
>>>> Pragma=no-cache, Server=MX/WEBSERVICE 3.X, Content-Type=text/xml;
>>>> charset=UTF-8, CamelHttpResponseCode=500,
>>>> SOAPAction="http://xxx.com/interfaces/ticket", Connection=close}
>>>>
>>>> br,
>>>> attila
>>>>
>>>>
>>>> attilav wrote:
>>>>>
>>>>> Hi Willem,
>>>>>
>>>>> I'm using camel 2.2.0 - within servicemix 3.3.
>>>>>
>>>>> thanks for the quick answer,
>>>>> attilav
>>>>>
>>>>>
>>>>> willem.jiang wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Which Camel version are you using?
>>>>>> I just checked the camel trunk code, there is no code which turn the
>>>>>> headers into lower case.
>>>>>>
>>>>>> Willem
>>>>>>
>>>>>> attilav wrote:
>>>>>>>
>>>>>>> Hi everyone,
>>>>>>>
>>>>>>> I'm trying to use the camel-http to send a soap request, however the
>>>>>>> camel
>>>>>>> exchange headers get converted to lowercase during the http post. Is
>>>>>>> this a
>>>>>>> feature, or bug? Is there a way around it?
>>>>>>>
>>>>>>> My setup is something like this:
>>>>>>>
>>>>>>> from("activemq:queue:tempque")
>>>>>>>      .setHeader(Exchange.HTTP_METHOD,
>>>>>>> constant(org.apache.camel.component.http.HttpMethods.POST))
>>>>>>>      .setHeader("SOAPAction",
>>>>>>> constant("http://xxx.com/interfaces/ticket"))
>>>>>>>      .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>>>>>>>      .setHeader("myHeaDer", constant("akarmi head"))
>>>>>>>      .setHeader("xxxSOAPAction", constant("sakarmi head"))
>>>>>>>      .to("http://iface.intra:8115/ticket")
>>>>>>>
>>>>>>> what actually gets sent over the wire is:
>>>>>>>
>>>>>>> POST /fault_ticket HTTP/1.1
>>>>>>> myheader: akarmi head
>>>>>>> soapaction: "http://xxx.com/interfaces/ticket"
>>>>>>> xxxsoapaction: sakarmi head
>>>>>>> User-Agent: Jakarta Commons-HttpClient/3.1
>>>>>>> Host: iface.nrps.telekom.intra:8115
>>>>>>> Content-Length: 1056
>>>>>>> Content-Type: text/xml; charset=utf-8
>>>>>>>
>>>>>>> <soap:Envelope  ....
>>>>>>>
>>>>>>> The remote side is case sensitive on http headers, and complies about
>>>>>>> an
>>>>>>> invalid soap action.
>>>>>>>
>>>>>>> Thanks
>>>>>>> attilav
>>>>>>
>>>
>>>
>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: camel-http converts headers to lower case

Posted by Willem Jiang <wi...@gmail.com>.
Hi attilav

I'm afraid there is no workaround :(
As we just cut the camel 2.3.0, I don't think this issue is a blocker 
issue of Camel, so I marked the JIRA to be resolve in camel 2.4.0.

Maybe you can use the Fuse camel 2.3.0, which will come out in an month, 
if you can't wait for the Camel 2.4.0 release.

Willem



attilav wrote:
> thnx,  so no workaround until 2.4 :(
> attilav
> 
> 
> willem.jiang wrote:
>> Oh, I found the key, it's a bug of camel-http.
>> Current message header is using CaseInsensitiveMap[1] to store the 
>> header key and value.
>>
>> And the HttpProducer should use the map.entrySet() to access the value 
>> instead of use map.getKeySet() to go through the headers.
>>
>> I already create a JIRA[2] for it.
>>
>> [1]https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
>>
>> [2]https://issues.apache.org/activemq/browse/CAMEL-2743
>>
>> Willem
>>
>>
>> attilav wrote:
>>> Some more info I found:
>>>
>>> After the http request the camel exchange headers
>>> (exchange.getIn().getHeaders()) seem to be OK, that is, the headers are
>>> copied correctly from the in message, and the http response headers are
>>> added too.
>>>
>>> 2010-05-20 13:29:46,502 | INFO  | xINH
>>> VVVVVVVVVVVVVVV{CamelHttpMethod=POST,
>>> myHeaDer=akarmi head, Content-Length=1003, xxxSOAPAction=sakarmi head,
>>> Expires=0, Cache-Control=private, pre-check=0, post-check=0, max-age=0,
>>> Pragma=no-cache, Server=MX/WEBSERVICE 3.X, Content-Type=text/xml;
>>> charset=UTF-8, CamelHttpResponseCode=500,
>>> SOAPAction="http://xxx.com/interfaces/ticket", Connection=close}
>>>
>>> br,
>>> attila
>>>
>>>
>>> attilav wrote:
>>>> Hi Willem,
>>>>
>>>> I'm using camel 2.2.0 - within servicemix 3.3.
>>>>
>>>> thanks for the quick answer,
>>>> attilav
>>>>
>>>>
>>>> willem.jiang wrote:
>>>>> Hi
>>>>>
>>>>> Which Camel version are you using?
>>>>> I just checked the camel trunk code, there is no code which turn the 
>>>>> headers into lower case.
>>>>>
>>>>> Willem
>>>>>
>>>>> attilav wrote:
>>>>>> Hi everyone,
>>>>>>
>>>>>> I'm trying to use the camel-http to send a soap request, however the
>>>>>> camel
>>>>>> exchange headers get converted to lowercase during the http post. Is
>>>>>> this a
>>>>>> feature, or bug? Is there a way around it?
>>>>>>
>>>>>> My setup is something like this:
>>>>>>
>>>>>> from("activemq:queue:tempque")
>>>>>>       .setHeader(Exchange.HTTP_METHOD,
>>>>>> constant(org.apache.camel.component.http.HttpMethods.POST))
>>>>>>       .setHeader("SOAPAction",
>>>>>> constant("http://xxx.com/interfaces/ticket"))
>>>>>>       .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>>>>>>       .setHeader("myHeaDer", constant("akarmi head"))
>>>>>>       .setHeader("xxxSOAPAction", constant("sakarmi head"))
>>>>>>       .to("http://iface.intra:8115/ticket")
>>>>>>
>>>>>> what actually gets sent over the wire is:
>>>>>>
>>>>>> POST /fault_ticket HTTP/1.1
>>>>>> myheader: akarmi head
>>>>>> soapaction: "http://xxx.com/interfaces/ticket"
>>>>>> xxxsoapaction: sakarmi head
>>>>>> User-Agent: Jakarta Commons-HttpClient/3.1
>>>>>> Host: iface.nrps.telekom.intra:8115
>>>>>> Content-Length: 1056
>>>>>> Content-Type: text/xml; charset=utf-8
>>>>>>
>>>>>> <soap:Envelope  ....
>>>>>>
>>>>>> The remote side is case sensitive on http headers, and complies about
>>>>>> an
>>>>>> invalid soap action.
>>>>>>
>>>>>> Thanks
>>>>>> attilav
>>>>>
>>
>>
> 


Re: camel-http converts headers to lower case

Posted by attilav <dz...@freemail.hu>.
thnx,  so no workaround until 2.4 :(
attilav


willem.jiang wrote:
> 
> Oh, I found the key, it's a bug of camel-http.
> Current message header is using CaseInsensitiveMap[1] to store the 
> header key and value.
> 
> And the HttpProducer should use the map.entrySet() to access the value 
> instead of use map.getKeySet() to go through the headers.
> 
> I already create a JIRA[2] for it.
> 
> [1]https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java
> 
> [2]https://issues.apache.org/activemq/browse/CAMEL-2743
> 
> Willem
> 
> 
> attilav wrote:
>> Some more info I found:
>> 
>> After the http request the camel exchange headers
>> (exchange.getIn().getHeaders()) seem to be OK, that is, the headers are
>> copied correctly from the in message, and the http response headers are
>> added too.
>> 
>> 2010-05-20 13:29:46,502 | INFO  | xINH
>> VVVVVVVVVVVVVVV{CamelHttpMethod=POST,
>> myHeaDer=akarmi head, Content-Length=1003, xxxSOAPAction=sakarmi head,
>> Expires=0, Cache-Control=private, pre-check=0, post-check=0, max-age=0,
>> Pragma=no-cache, Server=MX/WEBSERVICE 3.X, Content-Type=text/xml;
>> charset=UTF-8, CamelHttpResponseCode=500,
>> SOAPAction="http://xxx.com/interfaces/ticket", Connection=close}
>> 
>> br,
>> attila
>> 
>> 
>> attilav wrote:
>>> Hi Willem,
>>>
>>> I'm using camel 2.2.0 - within servicemix 3.3.
>>>
>>> thanks for the quick answer,
>>> attilav
>>>
>>>
>>> willem.jiang wrote:
>>>> Hi
>>>>
>>>> Which Camel version are you using?
>>>> I just checked the camel trunk code, there is no code which turn the 
>>>> headers into lower case.
>>>>
>>>> Willem
>>>>
>>>> attilav wrote:
>>>>> Hi everyone,
>>>>>
>>>>> I'm trying to use the camel-http to send a soap request, however the
>>>>> camel
>>>>> exchange headers get converted to lowercase during the http post. Is
>>>>> this a
>>>>> feature, or bug? Is there a way around it?
>>>>>
>>>>> My setup is something like this:
>>>>>
>>>>> from("activemq:queue:tempque")
>>>>>       .setHeader(Exchange.HTTP_METHOD,
>>>>> constant(org.apache.camel.component.http.HttpMethods.POST))
>>>>>       .setHeader("SOAPAction",
>>>>> constant("http://xxx.com/interfaces/ticket"))
>>>>>       .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>>>>>       .setHeader("myHeaDer", constant("akarmi head"))
>>>>>       .setHeader("xxxSOAPAction", constant("sakarmi head"))
>>>>>       .to("http://iface.intra:8115/ticket")
>>>>>
>>>>> what actually gets sent over the wire is:
>>>>>
>>>>> POST /fault_ticket HTTP/1.1
>>>>> myheader: akarmi head
>>>>> soapaction: "http://xxx.com/interfaces/ticket"
>>>>> xxxsoapaction: sakarmi head
>>>>> User-Agent: Jakarta Commons-HttpClient/3.1
>>>>> Host: iface.nrps.telekom.intra:8115
>>>>> Content-Length: 1056
>>>>> Content-Type: text/xml; charset=utf-8
>>>>>
>>>>> <soap:Envelope  ....
>>>>>
>>>>> The remote side is case sensitive on http headers, and complies about
>>>>> an
>>>>> invalid soap action.
>>>>>
>>>>> Thanks
>>>>> attilav
>>>>
>>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/camel-http-converts-headers-to-lower-case-tp28620717p28621640.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-http converts headers to lower case

Posted by Willem Jiang <wi...@gmail.com>.
Oh, I found the key, it's a bug of camel-http.
Current message header is using CaseInsensitiveMap[1] to store the 
header key and value.

And the HttpProducer should use the map.entrySet() to access the value 
instead of use map.getKeySet() to go through the headers.

I already create a JIRA[2] for it.

[1]https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/util/CaseInsensitiveMap.java

[2]https://issues.apache.org/activemq/browse/CAMEL-2743

Willem


attilav wrote:
> Some more info I found:
> 
> After the http request the camel exchange headers
> (exchange.getIn().getHeaders()) seem to be OK, that is, the headers are
> copied correctly from the in message, and the http response headers are
> added too.
> 
> 2010-05-20 13:29:46,502 | INFO  | xINH VVVVVVVVVVVVVVV{CamelHttpMethod=POST,
> myHeaDer=akarmi head, Content-Length=1003, xxxSOAPAction=sakarmi head,
> Expires=0, Cache-Control=private, pre-check=0, post-check=0, max-age=0,
> Pragma=no-cache, Server=MX/WEBSERVICE 3.X, Content-Type=text/xml;
> charset=UTF-8, CamelHttpResponseCode=500,
> SOAPAction="http://xxx.com/interfaces/ticket", Connection=close}
> 
> br,
> attila
> 
> 
> attilav wrote:
>> Hi Willem,
>>
>> I'm using camel 2.2.0 - within servicemix 3.3.
>>
>> thanks for the quick answer,
>> attilav
>>
>>
>> willem.jiang wrote:
>>> Hi
>>>
>>> Which Camel version are you using?
>>> I just checked the camel trunk code, there is no code which turn the 
>>> headers into lower case.
>>>
>>> Willem
>>>
>>> attilav wrote:
>>>> Hi everyone,
>>>>
>>>> I'm trying to use the camel-http to send a soap request, however the
>>>> camel
>>>> exchange headers get converted to lowercase during the http post. Is
>>>> this a
>>>> feature, or bug? Is there a way around it?
>>>>
>>>> My setup is something like this:
>>>>
>>>> from("activemq:queue:tempque")
>>>>       .setHeader(Exchange.HTTP_METHOD,
>>>> constant(org.apache.camel.component.http.HttpMethods.POST))
>>>>       .setHeader("SOAPAction",
>>>> constant("http://xxx.com/interfaces/ticket"))
>>>>       .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>>>>       .setHeader("myHeaDer", constant("akarmi head"))
>>>>       .setHeader("xxxSOAPAction", constant("sakarmi head"))
>>>>       .to("http://iface.intra:8115/ticket")
>>>>
>>>> what actually gets sent over the wire is:
>>>>
>>>> POST /fault_ticket HTTP/1.1
>>>> myheader: akarmi head
>>>> soapaction: "http://xxx.com/interfaces/ticket"
>>>> xxxsoapaction: sakarmi head
>>>> User-Agent: Jakarta Commons-HttpClient/3.1
>>>> Host: iface.nrps.telekom.intra:8115
>>>> Content-Length: 1056
>>>> Content-Type: text/xml; charset=utf-8
>>>>
>>>> <soap:Envelope  ....
>>>>
>>>> The remote side is case sensitive on http headers, and complies about an
>>>> invalid soap action.
>>>>
>>>> Thanks
>>>> attilav
>>>
>>>
>>
> 


Re: camel-http converts headers to lower case

Posted by attilav <dz...@freemail.hu>.
Some more info I found:

After the http request the camel exchange headers
(exchange.getIn().getHeaders()) seem to be OK, that is, the headers are
copied correctly from the in message, and the http response headers are
added too.

2010-05-20 13:29:46,502 | INFO  | xINH VVVVVVVVVVVVVVV{CamelHttpMethod=POST,
myHeaDer=akarmi head, Content-Length=1003, xxxSOAPAction=sakarmi head,
Expires=0, Cache-Control=private, pre-check=0, post-check=0, max-age=0,
Pragma=no-cache, Server=MX/WEBSERVICE 3.X, Content-Type=text/xml;
charset=UTF-8, CamelHttpResponseCode=500,
SOAPAction="http://xxx.com/interfaces/ticket", Connection=close}

br,
attila


attilav wrote:
> 
> Hi Willem,
> 
> I'm using camel 2.2.0 - within servicemix 3.3.
> 
> thanks for the quick answer,
> attilav
> 
> 
> willem.jiang wrote:
>> 
>> Hi
>> 
>> Which Camel version are you using?
>> I just checked the camel trunk code, there is no code which turn the 
>> headers into lower case.
>> 
>> Willem
>> 
>> attilav wrote:
>>> Hi everyone,
>>> 
>>> I'm trying to use the camel-http to send a soap request, however the
>>> camel
>>> exchange headers get converted to lowercase during the http post. Is
>>> this a
>>> feature, or bug? Is there a way around it?
>>> 
>>> My setup is something like this:
>>> 
>>> from("activemq:queue:tempque")
>>>       .setHeader(Exchange.HTTP_METHOD,
>>> constant(org.apache.camel.component.http.HttpMethods.POST))
>>>       .setHeader("SOAPAction",
>>> constant("http://xxx.com/interfaces/ticket"))
>>>       .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>>>       .setHeader("myHeaDer", constant("akarmi head"))
>>>       .setHeader("xxxSOAPAction", constant("sakarmi head"))
>>>       .to("http://iface.intra:8115/ticket")
>>> 
>>> what actually gets sent over the wire is:
>>> 
>>> POST /fault_ticket HTTP/1.1
>>> myheader: akarmi head
>>> soapaction: "http://xxx.com/interfaces/ticket"
>>> xxxsoapaction: sakarmi head
>>> User-Agent: Jakarta Commons-HttpClient/3.1
>>> Host: iface.nrps.telekom.intra:8115
>>> Content-Length: 1056
>>> Content-Type: text/xml; charset=utf-8
>>> 
>>> <soap:Envelope  ....
>>> 
>>> The remote side is case sensitive on http headers, and complies about an
>>> invalid soap action.
>>> 
>>> Thanks
>>> attilav
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/camel-http-converts-headers-to-lower-case-tp28620717p28621130.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel-http converts headers to lower case

Posted by attilav <dz...@freemail.hu>.
Hi Willem,

I'm using camel 2.2.0 - within servicemix 3.3.

thanks for the quick answer,
attilav


willem.jiang wrote:
> 
> Hi
> 
> Which Camel version are you using?
> I just checked the camel trunk code, there is no code which turn the 
> headers into lower case.
> 
> Willem
> 
> attilav wrote:
>> Hi everyone,
>> 
>> I'm trying to use the camel-http to send a soap request, however the
>> camel
>> exchange headers get converted to lowercase during the http post. Is this
>> a
>> feature, or bug? Is there a way around it?
>> 
>> My setup is something like this:
>> 
>> from("activemq:queue:tempque")
>>       .setHeader(Exchange.HTTP_METHOD,
>> constant(org.apache.camel.component.http.HttpMethods.POST))
>>       .setHeader("SOAPAction",
>> constant("http://xxx.com/interfaces/ticket"))
>>       .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>>       .setHeader("myHeaDer", constant("akarmi head"))
>>       .setHeader("xxxSOAPAction", constant("sakarmi head"))
>>       .to("http://iface.intra:8115/ticket")
>> 
>> what actually gets sent over the wire is:
>> 
>> POST /fault_ticket HTTP/1.1
>> myheader: akarmi head
>> soapaction: "http://xxx.com/interfaces/ticket"
>> xxxsoapaction: sakarmi head
>> User-Agent: Jakarta Commons-HttpClient/3.1
>> Host: iface.nrps.telekom.intra:8115
>> Content-Length: 1056
>> Content-Type: text/xml; charset=utf-8
>> 
>> <soap:Envelope  ....
>> 
>> The remote side is case sensitive on http headers, and complies about an
>> invalid soap action.
>> 
>> Thanks
>> attilav
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/camel-http-converts-headers-to-lower-case-tp28620717p28621053.html
Sent from the Camel - Users mailing list archive at Nabble.com.


AW: camel-http converts headers to lower case

Posted by Schneider Christian <Ch...@enbw.com>.
Hi Willem,

can this be the problem that headers in camel are case insensitive since some 2.x version?

Greetings

Christian





Christian Schneider
Team Handel und Risikomanagement
Informationsverarbeitung Business Solutions Trading
EnBW Systeme Infrastruktur Support GmbH

Informationsverarbeitung 
Business Solutions
Handel und Dispatching
Durlacher Allee 93
76131 Karlsruhe

Tel : +49-(0)721-63-15482
Mail: christian.schneider@enbw.com

EnBW Systeme Infrastruktur Support GmbH
Sitz der Gesellschaft: Karlsruhe
Handelsregister: Amtsgericht Mannheim ­ HRB 108550
Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck
Geschäftsführer: Jochen Adenau, Hans-Günther Meier


-----Ursprüngliche Nachricht-----
Von: Willem Jiang [mailto:willem.jiang@gmail.com] 
Gesendet: Donnerstag, 20. Mai 2010 15:07
An: users@camel.apache.org
Betreff: Re: camel-http converts headers to lower case

Hi

Which Camel version are you using?
I just checked the camel trunk code, there is no code which turn the 
headers into lower case.

Willem

attilav wrote:
> Hi everyone,
> 
> I'm trying to use the camel-http to send a soap request, however the camel
> exchange headers get converted to lowercase during the http post. Is this a
> feature, or bug? Is there a way around it?
> 
> My setup is something like this:
> 
> from("activemq:queue:tempque")
>       .setHeader(Exchange.HTTP_METHOD,
> constant(org.apache.camel.component.http.HttpMethods.POST))
>       .setHeader("SOAPAction", constant("http://xxx.com/interfaces/ticket"))
>       .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>       .setHeader("myHeaDer", constant("akarmi head"))
>       .setHeader("xxxSOAPAction", constant("sakarmi head"))
>       .to("http://iface.intra:8115/ticket")
> 
> what actually gets sent over the wire is:
> 
> POST /fault_ticket HTTP/1.1
> myheader: akarmi head
> soapaction: "http://xxx.com/interfaces/ticket"
> xxxsoapaction: sakarmi head
> User-Agent: Jakarta Commons-HttpClient/3.1
> Host: iface.nrps.telekom.intra:8115
> Content-Length: 1056
> Content-Type: text/xml; charset=utf-8
> 
> <soap:Envelope  ....
> 
> The remote side is case sensitive on http headers, and complies about an
> invalid soap action.
> 
> Thanks
> attilav


Re: camel-http converts headers to lower case

Posted by Willem Jiang <wi...@gmail.com>.
Hi

Which Camel version are you using?
I just checked the camel trunk code, there is no code which turn the 
headers into lower case.

Willem

attilav wrote:
> Hi everyone,
> 
> I'm trying to use the camel-http to send a soap request, however the camel
> exchange headers get converted to lowercase during the http post. Is this a
> feature, or bug? Is there a way around it?
> 
> My setup is something like this:
> 
> from("activemq:queue:tempque")
>       .setHeader(Exchange.HTTP_METHOD,
> constant(org.apache.camel.component.http.HttpMethods.POST))
>       .setHeader("SOAPAction", constant("http://xxx.com/interfaces/ticket"))
>       .setHeader("Content-Type", constant("text/xml; charset=utf-8"))
>       .setHeader("myHeaDer", constant("akarmi head"))
>       .setHeader("xxxSOAPAction", constant("sakarmi head"))
>       .to("http://iface.intra:8115/ticket")
> 
> what actually gets sent over the wire is:
> 
> POST /fault_ticket HTTP/1.1
> myheader: akarmi head
> soapaction: "http://xxx.com/interfaces/ticket"
> xxxsoapaction: sakarmi head
> User-Agent: Jakarta Commons-HttpClient/3.1
> Host: iface.nrps.telekom.intra:8115
> Content-Length: 1056
> Content-Type: text/xml; charset=utf-8
> 
> <soap:Envelope  ....
> 
> The remote side is case sensitive on http headers, and complies about an
> invalid soap action.
> 
> Thanks
> attilav