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 <willem.ji...@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






Reply via email to