You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Wayne Keenan <wa...@gmail.com> on 2010/03/01 20:22:47 UTC

issue with HTTP response content length being set to CXF request length - causing truncated responses.

Hi,

I have run into an issue where the HTTP response message is being truncated
to the exactly length of the incoming CXF request, i.e.
response.contentLength seems to be being set to the request.contentLength,

I have  the following setup:

   1. I am advertising a WSDL file via a CXF endpoint.
   2. The route is from CXF to a back end WS via the HTTP component.
   3. The backend service is a Tuscany SCA component, invoked via SOAP over
   HTTP.


The Camel/CXF interceptor logging shows the entire message payload. Also,
calling the backend service (3) directly using SOAPui functions correctly

If I start adding characters to the request just to make it longer, e.g.
just after </soapenv:Body>,  but it doesn't matter where,  then for each
character I add I see an additional character of the response that otherwise
gets truncated.

Versions:
Camel 2.1.0
CXF 2.2.6 (tried 2.2.4 also )
Tuscany 1.6  (tried 1.5.1 also )
Java 1.6
MacOSX 10.6





The config is (lightly edited):

    <cxf:cxfEndpoint id="ServiceEndpoint"
                     address="http://localhost:8080/services/Service"
                     wsdlURL="file:service.wsdl"
                     serviceName="a:Service"
                     endpointName="a:ServicePort"
                     xmlns:a="http://a.com">
    </cxf:cxfEndpoint>

    <camelContext trace="true" xmlns="http://camel.apache.org/schema/spring
">

        <route>
            <from uri="cxf:bean:ServiceEndpoint"/>
            <to uri="http://localhost:8086/services/Service"/>
        </route>


    </camelContext>


I have also tried specifying the 'bridgeEndpoint=true' option to the HTTP
component URI thinking that may help, but the problem is still the same.

Should I explicitly be fixing up the content length? if so how do I do that?


All the best
Wayne

Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by Willem Jiang <wi...@gmail.com>.
Yes, we need to update the wiki page for it.

Willem

zigo wrote:
> Willem,
> 
> my route is this:
> 
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
> 		<route>
> 			<from
> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
> 			
> 			<!-- Workaround to a Camel bug -->
> 			<removeHeader headerName="Content-Length" />
> 			<convertBodyTo type="String" />
> 			<to
> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
> />
> 		</route>
> 	</camelContext>
> 
> I think this issue should be considered a bug, or at least pointed out in
> Camel documentation.
> 
> Alberto
> 
> 
> willem.jiang wrote:
>> We filter the message header of "Content-Length" from camel to cxf.
>> If you just pass the message to the other camel endpoint, I'm afraid you 
>> need to remove it you self.
>>
>> Willem
>>
>> zigo wrote:
>>> I am still having the same problem using:
>>>
>>> - Camel 2.2.0
>>> - CXF 2.2.6
>>> - Mac OS 10.6.2
>>>
>>> Workaround (removing http header) works for me.
>>>
>>> Alberto
>>>
>>>
>>>
>>>
>>> wkeenan wrote:
>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi
>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>
>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>
>>>> Thanks,
>>>> Wayne
>>>>
>>>>
>>
>>
> 


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by Willem Jiang <wi...@gmail.com>.
The url is OK, I can see the latest Camel 2.3.0-SNAPSHOT was published 
yesterday, maybe you can try to run the test again.

Willem

zigo wrote:
> Willem,
> 
> I am not sure I got your question right, anyway I have downloaded version
> 2.3-SNAPSHOT from the Apache Snapshots repository at
> https://repository.apache.org/content/repositories/snapshots
> 
> Alberto
> 
> 
> 
> 
> willem.jiang wrote:
>> Hi,
>>
>> I'm doing the daily development of camel on the MacOSX.
>> Can you tell me how do get the Camel 2.3.0-SNAPSHOT ?
>> It will be helpful for use to trace the issue.
>>
>> Willem
>>
>> zigo wrote:
>>> What platform are you testing on?
>>>
>>> I have seen that this problem manifests only on MacOS, tests done on
>>> Windows
>>> work without removing the Content-Length.
>>>
>>> Anyway, I will try compiling the trunk.
>>>
>>> Alberto
>>>
>>>
>>>
>>> willem.jiang wrote:
>>>> Hi,
>>>>
>>>> Can you build the trunk code yourself ?
>>>> My test is working[1], I'm doubt there are something wrong with SNAPSHOT 
>>>> publish.
>>>>
>>>> [1] http://svn.apache.org/viewvc?rev=929475&view=rev
>>>>
>>>> Willem
>>>>
>>>> zigo wrote:
>>>>> Willem,
>>>>>
>>>>> I have tried with the latest 2.3-SNAPSHOT, but unfortunately the
>>>>> problem
>>>>> is
>>>>> still there.
>>>>>
>>>>> Alberto
>>>>>
>>>>>
>>>>> willem.jiang wrote:
>>>>>> FYI, I create a JIRA[1] for this issue and committed a quick fix for
>>>>>> it.
>>>>>> Please feel free to check out the latest Camel 2.3.0-SNAPSHOT to
>>>>>> verify
>>>>>> it.
>>>>>>
>>>>>> Willem
>>>>>>
>>>>>> zigo wrote:
>>>>>>> Willem,
>>>>>>>
>>>>>>> my route is this:
>>>>>>>
>>>>>>> <camelContext id="camel"
>>>>>>> xmlns="http://camel.apache.org/schema/spring">
>>>>>>> 		<route>
>>>>>>> 			<from
>>>>>>> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
>>>>>>> 			
>>>>>>> 			<!-- Workaround to a Camel bug -->
>>>>>>> 			<removeHeader headerName="Content-Length" />
>>>>>>> 			<convertBodyTo type="String" />
>>>>>>> 			<to
>>>>>>> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
>>>>>>> />
>>>>>>> 		</route>
>>>>>>> 	</camelContext>
>>>>>>>
>>>>>>> I think this issue should be considered a bug, or at least pointed
>>>>>>> out
>>>>>>> in
>>>>>>> Camel documentation.
>>>>>>>
>>>>>>> Alberto
>>>>>>>
>>>>>>>
>>>>>>> willem.jiang wrote:
>>>>>>>> We filter the message header of "Content-Length" from camel to cxf.
>>>>>>>> If you just pass the message to the other camel endpoint, I'm afraid
>>>>>>>> you 
>>>>>>>> need to remove it you self.
>>>>>>>>
>>>>>>>> Willem
>>>>>>>>
>>>>>>>> zigo wrote:
>>>>>>>>> I am still having the same problem using:
>>>>>>>>>
>>>>>>>>> - Camel 2.2.0
>>>>>>>>> - CXF 2.2.6
>>>>>>>>> - Mac OS 10.6.2
>>>>>>>>>
>>>>>>>>> Workaround (removing http header) works for me.
>>>>>>>>>
>>>>>>>>> Alberto
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> wkeenan wrote:
>>>>>>>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang
>>>>>>>>>> <wi...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi
>>>>>>>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>>>>>>>
>>>>>>>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Wayne
>>>>>>>>>>
>>>>>>>>>>
>>>>
>>
>>
> 


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by zigo <al...@gmail.com>.
Willem,

I am not sure I got your question right, anyway I have downloaded version
2.3-SNAPSHOT from the Apache Snapshots repository at
https://repository.apache.org/content/repositories/snapshots

Alberto




willem.jiang wrote:
> 
> Hi,
> 
> I'm doing the daily development of camel on the MacOSX.
> Can you tell me how do get the Camel 2.3.0-SNAPSHOT ?
> It will be helpful for use to trace the issue.
> 
> Willem
> 
> zigo wrote:
>> What platform are you testing on?
>> 
>> I have seen that this problem manifests only on MacOS, tests done on
>> Windows
>> work without removing the Content-Length.
>> 
>> Anyway, I will try compiling the trunk.
>> 
>> Alberto
>> 
>> 
>> 
>> willem.jiang wrote:
>>> Hi,
>>>
>>> Can you build the trunk code yourself ?
>>> My test is working[1], I'm doubt there are something wrong with SNAPSHOT 
>>> publish.
>>>
>>> [1] http://svn.apache.org/viewvc?rev=929475&view=rev
>>>
>>> Willem
>>>
>>> zigo wrote:
>>>> Willem,
>>>>
>>>> I have tried with the latest 2.3-SNAPSHOT, but unfortunately the
>>>> problem
>>>> is
>>>> still there.
>>>>
>>>> Alberto
>>>>
>>>>
>>>> willem.jiang wrote:
>>>>> FYI, I create a JIRA[1] for this issue and committed a quick fix for
>>>>> it.
>>>>> Please feel free to check out the latest Camel 2.3.0-SNAPSHOT to
>>>>> verify
>>>>> it.
>>>>>
>>>>> Willem
>>>>>
>>>>> zigo wrote:
>>>>>> Willem,
>>>>>>
>>>>>> my route is this:
>>>>>>
>>>>>> <camelContext id="camel"
>>>>>> xmlns="http://camel.apache.org/schema/spring">
>>>>>> 		<route>
>>>>>> 			<from
>>>>>> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
>>>>>> 			
>>>>>> 			<!-- Workaround to a Camel bug -->
>>>>>> 			<removeHeader headerName="Content-Length" />
>>>>>> 			<convertBodyTo type="String" />
>>>>>> 			<to
>>>>>> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
>>>>>> />
>>>>>> 		</route>
>>>>>> 	</camelContext>
>>>>>>
>>>>>> I think this issue should be considered a bug, or at least pointed
>>>>>> out
>>>>>> in
>>>>>> Camel documentation.
>>>>>>
>>>>>> Alberto
>>>>>>
>>>>>>
>>>>>> willem.jiang wrote:
>>>>>>> We filter the message header of "Content-Length" from camel to cxf.
>>>>>>> If you just pass the message to the other camel endpoint, I'm afraid
>>>>>>> you 
>>>>>>> need to remove it you self.
>>>>>>>
>>>>>>> Willem
>>>>>>>
>>>>>>> zigo wrote:
>>>>>>>> I am still having the same problem using:
>>>>>>>>
>>>>>>>> - Camel 2.2.0
>>>>>>>> - CXF 2.2.6
>>>>>>>> - Mac OS 10.6.2
>>>>>>>>
>>>>>>>> Workaround (removing http header) works for me.
>>>>>>>>
>>>>>>>> Alberto
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> wkeenan wrote:
>>>>>>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang
>>>>>>>>> <wi...@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi
>>>>>>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>>>>>>
>>>>>>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Wayne
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/issue-with-HTTP-response-content-length-being-set-to-CXF-request--length---causing-truncated-responses.-tp27747908p28117551.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

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

I'm doing the daily development of camel on the MacOSX.
Can you tell me how do get the Camel 2.3.0-SNAPSHOT ?
It will be helpful for use to trace the issue.

Willem

zigo wrote:
> What platform are you testing on?
> 
> I have seen that this problem manifests only on MacOS, tests done on Windows
> work without removing the Content-Length.
> 
> Anyway, I will try compiling the trunk.
> 
> Alberto
> 
> 
> 
> willem.jiang wrote:
>> Hi,
>>
>> Can you build the trunk code yourself ?
>> My test is working[1], I'm doubt there are something wrong with SNAPSHOT 
>> publish.
>>
>> [1] http://svn.apache.org/viewvc?rev=929475&view=rev
>>
>> Willem
>>
>> zigo wrote:
>>> Willem,
>>>
>>> I have tried with the latest 2.3-SNAPSHOT, but unfortunately the problem
>>> is
>>> still there.
>>>
>>> Alberto
>>>
>>>
>>> willem.jiang wrote:
>>>> FYI, I create a JIRA[1] for this issue and committed a quick fix for it.
>>>> Please feel free to check out the latest Camel 2.3.0-SNAPSHOT to verify
>>>> it.
>>>>
>>>> Willem
>>>>
>>>> zigo wrote:
>>>>> Willem,
>>>>>
>>>>> my route is this:
>>>>>
>>>>> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>>>>> 		<route>
>>>>> 			<from
>>>>> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
>>>>> 			
>>>>> 			<!-- Workaround to a Camel bug -->
>>>>> 			<removeHeader headerName="Content-Length" />
>>>>> 			<convertBodyTo type="String" />
>>>>> 			<to
>>>>> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
>>>>> />
>>>>> 		</route>
>>>>> 	</camelContext>
>>>>>
>>>>> I think this issue should be considered a bug, or at least pointed out
>>>>> in
>>>>> Camel documentation.
>>>>>
>>>>> Alberto
>>>>>
>>>>>
>>>>> willem.jiang wrote:
>>>>>> We filter the message header of "Content-Length" from camel to cxf.
>>>>>> If you just pass the message to the other camel endpoint, I'm afraid
>>>>>> you 
>>>>>> need to remove it you self.
>>>>>>
>>>>>> Willem
>>>>>>
>>>>>> zigo wrote:
>>>>>>> I am still having the same problem using:
>>>>>>>
>>>>>>> - Camel 2.2.0
>>>>>>> - CXF 2.2.6
>>>>>>> - Mac OS 10.6.2
>>>>>>>
>>>>>>> Workaround (removing http header) works for me.
>>>>>>>
>>>>>>> Alberto
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> wkeenan wrote:
>>>>>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang
>>>>>>>> <wi...@gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>>>>>
>>>>>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Wayne
>>>>>>>>
>>>>>>>>
>>>>
>>
>>
> 


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by zigo <al...@gmail.com>.
What platform are you testing on?

I have seen that this problem manifests only on MacOS, tests done on Windows
work without removing the Content-Length.

Anyway, I will try compiling the trunk.

Alberto



willem.jiang wrote:
> 
> Hi,
> 
> Can you build the trunk code yourself ?
> My test is working[1], I'm doubt there are something wrong with SNAPSHOT 
> publish.
> 
> [1] http://svn.apache.org/viewvc?rev=929475&view=rev
> 
> Willem
> 
> zigo wrote:
>> Willem,
>> 
>> I have tried with the latest 2.3-SNAPSHOT, but unfortunately the problem
>> is
>> still there.
>> 
>> Alberto
>> 
>> 
>> willem.jiang wrote:
>>> FYI, I create a JIRA[1] for this issue and committed a quick fix for it.
>>> Please feel free to check out the latest Camel 2.3.0-SNAPSHOT to verify
>>> it.
>>>
>>> Willem
>>>
>>> zigo wrote:
>>>> Willem,
>>>>
>>>> my route is this:
>>>>
>>>> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>>>> 		<route>
>>>> 			<from
>>>> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
>>>> 			
>>>> 			<!-- Workaround to a Camel bug -->
>>>> 			<removeHeader headerName="Content-Length" />
>>>> 			<convertBodyTo type="String" />
>>>> 			<to
>>>> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
>>>> />
>>>> 		</route>
>>>> 	</camelContext>
>>>>
>>>> I think this issue should be considered a bug, or at least pointed out
>>>> in
>>>> Camel documentation.
>>>>
>>>> Alberto
>>>>
>>>>
>>>> willem.jiang wrote:
>>>>> We filter the message header of "Content-Length" from camel to cxf.
>>>>> If you just pass the message to the other camel endpoint, I'm afraid
>>>>> you 
>>>>> need to remove it you self.
>>>>>
>>>>> Willem
>>>>>
>>>>> zigo wrote:
>>>>>> I am still having the same problem using:
>>>>>>
>>>>>> - Camel 2.2.0
>>>>>> - CXF 2.2.6
>>>>>> - Mac OS 10.6.2
>>>>>>
>>>>>> Workaround (removing http header) works for me.
>>>>>>
>>>>>> Alberto
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> wkeenan wrote:
>>>>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang
>>>>>>> <wi...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi
>>>>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>>>>
>>>>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Wayne
>>>>>>>
>>>>>>>
>>>>>
>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/issue-with-HTTP-response-content-length-being-set-to-CXF-request--length---causing-truncated-responses.-tp27747908p28111197.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

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

Can you build the trunk code yourself ?
My test is working[1], I'm doubt there are something wrong with SNAPSHOT 
publish.

[1] http://svn.apache.org/viewvc?rev=929475&view=rev

Willem

zigo wrote:
> Willem,
> 
> I have tried with the latest 2.3-SNAPSHOT, but unfortunately the problem is
> still there.
> 
> Alberto
> 
> 
> willem.jiang wrote:
>> FYI, I create a JIRA[1] for this issue and committed a quick fix for it.
>> Please feel free to check out the latest Camel 2.3.0-SNAPSHOT to verify
>> it.
>>
>> Willem
>>
>> zigo wrote:
>>> Willem,
>>>
>>> my route is this:
>>>
>>> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>>> 		<route>
>>> 			<from
>>> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
>>> 			
>>> 			<!-- Workaround to a Camel bug -->
>>> 			<removeHeader headerName="Content-Length" />
>>> 			<convertBodyTo type="String" />
>>> 			<to
>>> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
>>> />
>>> 		</route>
>>> 	</camelContext>
>>>
>>> I think this issue should be considered a bug, or at least pointed out in
>>> Camel documentation.
>>>
>>> Alberto
>>>
>>>
>>> willem.jiang wrote:
>>>> We filter the message header of "Content-Length" from camel to cxf.
>>>> If you just pass the message to the other camel endpoint, I'm afraid you 
>>>> need to remove it you self.
>>>>
>>>> Willem
>>>>
>>>> zigo wrote:
>>>>> I am still having the same problem using:
>>>>>
>>>>> - Camel 2.2.0
>>>>> - CXF 2.2.6
>>>>> - Mac OS 10.6.2
>>>>>
>>>>> Workaround (removing http header) works for me.
>>>>>
>>>>> Alberto
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> wkeenan wrote:
>>>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>>>
>>>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>>>
>>>>>> Thanks,
>>>>>> Wayne
>>>>>>
>>>>>>
>>>>
>>
>>
> 


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by zigo <al...@gmail.com>.
Willem,

I have tried with the latest 2.3-SNAPSHOT, but unfortunately the problem is
still there.

Alberto


willem.jiang wrote:
> 
> FYI, I create a JIRA[1] for this issue and committed a quick fix for it.
> Please feel free to check out the latest Camel 2.3.0-SNAPSHOT to verify
> it.
> 
> Willem
> 
> zigo wrote:
>> Willem,
>> 
>> my route is this:
>> 
>> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>> 		<route>
>> 			<from
>> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
>> 			
>> 			<!-- Workaround to a Camel bug -->
>> 			<removeHeader headerName="Content-Length" />
>> 			<convertBodyTo type="String" />
>> 			<to
>> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
>> />
>> 		</route>
>> 	</camelContext>
>> 
>> I think this issue should be considered a bug, or at least pointed out in
>> Camel documentation.
>> 
>> Alberto
>> 
>> 
>> willem.jiang wrote:
>>> We filter the message header of "Content-Length" from camel to cxf.
>>> If you just pass the message to the other camel endpoint, I'm afraid you 
>>> need to remove it you self.
>>>
>>> Willem
>>>
>>> zigo wrote:
>>>> I am still having the same problem using:
>>>>
>>>> - Camel 2.2.0
>>>> - CXF 2.2.6
>>>> - Mac OS 10.6.2
>>>>
>>>> Workaround (removing http header) works for me.
>>>>
>>>> Alberto
>>>>
>>>>
>>>>
>>>>
>>>> wkeenan wrote:
>>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi
>>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>>
>>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>>
>>>>> Thanks,
>>>>> Wayne
>>>>>
>>>>>
>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/issue-with-HTTP-response-content-length-being-set-to-CXF-request--length---causing-truncated-responses.-tp27747908p28107784.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by Willem Jiang <wi...@gmail.com>.
FYI, I create a JIRA[1] for this issue and committed a quick fix for it.
Please feel free to check out the latest Camel 2.3.0-SNAPSHOT to verify it.

Willem

zigo wrote:
> Willem,
> 
> my route is this:
> 
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
> 		<route>
> 			<from
> uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
> 			
> 			<!-- Workaround to a Camel bug -->
> 			<removeHeader headerName="Content-Length" />
> 			<convertBodyTo type="String" />
> 			<to
> uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
> />
> 		</route>
> 	</camelContext>
> 
> I think this issue should be considered a bug, or at least pointed out in
> Camel documentation.
> 
> Alberto
> 
> 
> willem.jiang wrote:
>> We filter the message header of "Content-Length" from camel to cxf.
>> If you just pass the message to the other camel endpoint, I'm afraid you 
>> need to remove it you self.
>>
>> Willem
>>
>> zigo wrote:
>>> I am still having the same problem using:
>>>
>>> - Camel 2.2.0
>>> - CXF 2.2.6
>>> - Mac OS 10.6.2
>>>
>>> Workaround (removing http header) works for me.
>>>
>>> Alberto
>>>
>>>
>>>
>>>
>>> wkeenan wrote:
>>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi
>>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>>
>>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>>
>>>> Thanks,
>>>> Wayne
>>>>
>>>>
>>
>>
> 


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by zigo <al...@gmail.com>.
Willem,

my route is this:

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
		<route>
			<from
uri="cxf:bean:gtEndpoint?serviceName={http://foo.com}gt_connector&amp;dataFormat=MESSAGE"/>
			
			<!-- Workaround to a Camel bug -->
			<removeHeader headerName="Content-Length" />
			<convertBodyTo type="String" />
			<to
uri="jms:GT.IN?replyTo=GT.OUT&amp;deliveryPersistent=false&amp;useMessageIDAsCorrelationID=true"
/>
		</route>
	</camelContext>

I think this issue should be considered a bug, or at least pointed out in
Camel documentation.

Alberto


willem.jiang wrote:
> 
> We filter the message header of "Content-Length" from camel to cxf.
> If you just pass the message to the other camel endpoint, I'm afraid you 
> need to remove it you self.
> 
> Willem
> 
> zigo wrote:
>> I am still having the same problem using:
>> 
>> - Camel 2.2.0
>> - CXF 2.2.6
>> - Mac OS 10.6.2
>> 
>> Workaround (removing http header) works for me.
>> 
>> Alberto
>> 
>> 
>> 
>> 
>> wkeenan wrote:
>>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com>
>>> wrote:
>>>
>>>> Hi
>>>> Can you check out the latest released Camel 2.2.0 ?
>>>>
>>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>>
>>> Thanks,
>>> Wayne
>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/issue-with-HTTP-response-content-length-being-set-to-CXF-request--length---causing-truncated-responses.-tp27747908p28092929.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by Willem Jiang <wi...@gmail.com>.
We filter the message header of "Content-Length" from camel to cxf.
If you just pass the message to the other camel endpoint, I'm afraid you 
need to remove it you self.

Willem

zigo wrote:
> I am still having the same problem using:
> 
> - Camel 2.2.0
> - CXF 2.2.6
> - Mac OS 10.6.2
> 
> Workaround (removing http header) works for me.
> 
> Alberto
> 
> 
> 
> 
> wkeenan wrote:
>> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com>
>> wrote:
>>
>>> Hi
>>> Can you check out the latest released Camel 2.2.0 ?
>>>
>> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
>>
>> Thanks,
>> Wayne
>>
>>
> 


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by zigo <al...@gmail.com>.
I am still having the same problem using:

- Camel 2.2.0
- CXF 2.2.6
- Mac OS 10.6.2

Workaround (removing http header) works for me.

Alberto




wkeenan wrote:
> 
> On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com>
> wrote:
> 
>> Hi
>> Can you check out the latest released Camel 2.2.0 ?
>>
> 
> working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6
> 
> Thanks,
> Wayne
> 
> 

-- 
View this message in context: http://old.nabble.com/issue-with-HTTP-response-content-length-being-set-to-CXF-request--length---causing-truncated-responses.-tp27747908p28088048.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by Wayne Keenan <wa...@gmail.com>.
On Tue, Mar 2, 2010 at 3:35 AM, Willem Jiang <wi...@gmail.com> wrote:

> Hi
> Can you check out the latest released Camel 2.2.0 ?
>

working on  camel 2.2.0,  CXF 2.2.6 on Mac10.6

Thanks,
Wayne

Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by Willem Jiang <wi...@gmail.com>.
Hi
Can you check out the latest released Camel 2.2.0 ?
We fix this kind of issue[1] in Camel 2.2.0.

[1] https://issues.apache.org/activemq/browse/CAMEL-2425

Willem

Wayne Keenan wrote:
> Deleting the content length header as the last action is a workaround.
> 
> Should I raise thus as an issue?
> 
> 
> Regards
> Wayne
> 
> 
> On 1 Mar 2010, at 19:22, Wayne Keenan <wa...@gmail.com> wrote:
> 
>> Hi,
>>
>> I have run into an issue where the HTTP response message is being 
>> truncated to the exactly length of the incoming CXF request, i.e.   
>> response.contentLength seems to be being set to the 
>> request.contentLength,
>>
>> I have  the following setup:
>> I am advertising a WSDL file via a CXF endpoint.
>> The route is from CXF to a back end WS via the HTTP component.
>> The backend service is a Tuscany SCA component, invoked via SOAP over 
>> HTTP.
>>
>> The Camel/CXF interceptor logging shows the entire message payload. 
>> Also, calling the backend service (3) directly using SOAPui functions 
>> correctly
>>
>> If I start adding characters to the request just to make it longer, 
>> e.g. just after </soapenv:Body>,  but it doesn't matter where,  then 
>> for each character I add I see an additional character of the response 
>> that otherwise gets truncated.
>>
>> Versions:
>> Camel 2.1.0
>> CXF 2.2.6 (tried 2.2.4 also )
>> Tuscany 1.6  (tried 1.5.1 also )
>> Java 1.6
>> MacOSX 10.6
>>
>>
>>
>>
>>
>> The config is (lightly edited):
>>
>>     <cxf:cxfEndpoint id="ServiceEndpoint"
>>                      address="http://localhost:8080/services/Service"
>>                      wsdlURL="file:service.wsdl"
>>                      serviceName="a:Service"
>>                      endpointName="a:ServicePort"
>>                      xmlns:a="http://a.com">
>>     </cxf:cxfEndpoint>
>>
>>     <camelContext trace="true" 
>> xmlns="http://camel.apache.org/schema/spring">
>>
>>         <route>
>>             <from uri="cxf:bean:ServiceEndpoint"/>
>>             <to uri="http://localhost:8086/services/Service"/>
>>         </route>
>>
>>
>>     </camelContext>
>>
>>
>> I have also tried specifying the 'bridgeEndpoint=true' option to the 
>> HTTP component URI thinking that may help, but the problem is still 
>> the same.
>>
>> Should I explicitly be fixing up the content length? if so how do I do 
>> that?
>>
>>
>> All the best
>> Wayne
>>
>>
> 


Re: issue with HTTP response content length being set to CXF request length - causing truncated responses.

Posted by Wayne Keenan <wa...@gmail.com>.
Deleting the content length header as the last action is a workaround.

Should I raise thus as an issue?


Regards
Wayne


On 1 Mar 2010, at 19:22, Wayne Keenan <wa...@gmail.com> wrote:

> Hi,
>
> I have run into an issue where the HTTP response message is being  
> truncated to the exactly length of the incoming CXF request, i.e.    
> response.contentLength seems to be being set to the  
> request.contentLength,
>
> I have  the following setup:
> I am advertising a WSDL file via a CXF endpoint.
> The route is from CXF to a back end WS via the HTTP component.
> The backend service is a Tuscany SCA component, invoked via SOAP  
> over HTTP.
>
> The Camel/CXF interceptor logging shows the entire message payload.  
> Also, calling the backend service (3) directly using SOAPui  
> functions correctly
>
> If I start adding characters to the request just to make it longer,  
> e.g. just after </soapenv:Body>,  but it doesn't matter where,  then  
> for each character I add I see an additional character of the  
> response that otherwise gets truncated.
>
> Versions:
> Camel 2.1.0
> CXF 2.2.6 (tried 2.2.4 also )
> Tuscany 1.6  (tried 1.5.1 also )
> Java 1.6
> MacOSX 10.6
>
>
>
>
>
> The config is (lightly edited):
>
>     <cxf:cxfEndpoint id="ServiceEndpoint"
>                      address="http://localhost:8080/services/Service"
>                      wsdlURL="file:service.wsdl"
>                      serviceName="a:Service"
>                      endpointName="a:ServicePort"
>                      xmlns:a="http://a.com">
>     </cxf:cxfEndpoint>
>
>     <camelContext trace="true" xmlns="http://camel.apache.org/schema/spring 
> ">
>
>         <route>
>             <from uri="cxf:bean:ServiceEndpoint"/>
>             <to uri="http://localhost:8086/services/Service"/>
>         </route>
>
>
>     </camelContext>
>
>
> I have also tried specifying the 'bridgeEndpoint=true' option to the  
> HTTP component URI thinking that may help, but the problem is still  
> the same.
>
> Should I explicitly be fixing up the content length? if so how do I  
> do that?
>
>
> All the best
> Wayne
>
>