You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by krishna <kr...@lac.uic.edu> on 2005/07/08 00:22:30 UTC

timeout exception because of no Content-Length

Hi Samisa/Fred/All,

Both the methods
1. Using the stubObj to setTransportTimeout
2. Calling setTimeout from the stub code

Gave me the following error.

Error
HTTPTransportException:Input streaming error while getting data Timed 
out waiting for SOAP message (1).

My analysis showed that the code with for http chunking has 2 parts.
1. For the initial chunk
2. For the subsequent chunks

It relies on the content length field to decide whether the current 
chunk is the first chunk or not
Please find the lines below from HTTPTransport.cpp

if( m_strReceived.length () > 0)
{
627
628 if( m_bChunked && m_iContentLength < 1) // Read first chunk
629 {


.......
722 }
723 else if( m_bChunked) // read continued portions of a chunk
724 {

As the SOAP - RESPONSE does not contain a Content-Length field. It keeps 
repeating the algorithm for the first chunk
and lands in an exception.

If my analysis is right then my question is why does the server not send 
a Content-Length field for chunked messages and how can this be 
incorporated?

Cheers
Krishna

Samisa Abeysinghe wrote:

> Well, without editing the generated code, you can change the user code:
>
> stubObj->setTransportTimeout(30);//assuming the stub object is a pointer
>
> Samisa…
>
> -----Original Message-----
> *From:* Fred Preston [mailto:PRESTONF@uk.ibm.com]
> *Sent:* Thursday, July 07, 2005 3:34 PM
> *To:* Apache AXIS C Developers List
> *Subject:* Re: how to set a timeout - update
>
>
> Hi Krishna,
> The IterationCountdown in the HTTPTransport::getBytes() method is not 
> a timeout, but is used to catch a potential deadlock situation where 
> the client is waiting for a response message from the server and the 
> server either never or only partially responds. The timeout for the 
> socket is set by HTTPTransport::setTimeout( long lSeconds). The 
> default channel timeout is 10 seconds. To change the timeout you have 
> to be able to call the setTimeout method. You cannot do this directly 
> from the client application because it does not have access to the 
> transport layer. You can however change the timeout at the generated 
> stub level. The best time to change the timeout is before the invoke, 
> i.e.
>
> *In the stub code for the web service method, change:*
> :
> if (AXIS_SUCCESS == m_pCall->invoke())
> {
> :
>
> *To:*
> :
> m_pCall->getTransport()->setTimeout( 30); // Change the socket timeout 
> to 30 seconds
> if (AXIS_SUCCESS == m_pCall->invoke())
> {
> :
>
> Regards,
>
> Fred Preston.
>
>
> 	
>
> *krishna <kr...@lac.uic.edu>*
>
> 07/07/2005 01:24 AM
> Please respond to "Apache AXIS C Developers List"
>
> 	
>
>
> To: Apache AXIS C Developers List <ax...@ws.apache.org>
> cc:
> Subject: Re: how to set a timeout - update
>
>
>
> Hi
>
> Sorry for the traffic in the mailing list.
>
> I traced the exception back to its where it was thrown. It looks like
> the timeout is hardcoded to 100 by setting iIterationCountdown=100 in
> the HTTPTransport.cpp:655 file.
>
> Is there a way of resetting this timeout without recompiling axis or
> Is there a way of recompiling the transport alone??
>
> Cheers
> Krishna
>
> krishna wrote:
>
>> Hi All
>>
>> The problem why the Array example was failing was due to timeouts. It
>> is "HTTPTransportException:Input streaming error while getting data
>> Timed out waiting for SOAP message (1)." I saw a discussion in the
>> lists about connection timeouts and response timeouts. Would this fall
>> under a response timeout ?
>>
>> I saw that Axis Java has a setTimeout functionality as part of the
>> stubs. I could not find it in Stub.hpp. Does this functionality exist
>> in Axis C++??
>>
>> Cheers
>> Krishna
>>
>>
>> krishna wrote:
>>
>>> Hi All
>>>
>>> I was implementing the Array example on Axis 1.6 alpha. (
>>> echoIntArray - The client sends an array of numbers and the server
>>> echoes the array back to the client ). This is a RPC based webservice
>>>
>>> The example seemed to work fine for < 200 numbers. For numbers > 200
>>> the I had the following problems
>>> I have attached the source code and stubs along with this email.
>>>
>>> Please find parts of the SOAP_RESPONSE below.
>>>
>>> 1. The server did not echo back all the numbers
>>>
>>> <item>1159</item>
>>> <item>1160</item>
>>> <item>1161</item>
>>> <item>1162</item>
>>> <item
>>>
>>> The message stopped here it was supposed to return 10000 items.
>>>
>>> 2. Some text - "ffb" came into the message
>>>
>>> <item>208</item>
>>> <item>209</item>
>>> <item
>>> ffb
>>> >210</item>
>>> <item>211</item>
>>> <item>212</item>
>>>
>>> <item>449</item>
>>> <item>450</item>
>>> ffb
>>>
>>> <item>451</item>
>>> <item>452</item>
>>>
>>> Is this a known issue? The output above was captured using ethereal.
>>>
>>> Cheers
>>> Krishna
>>>
>>
>>
>>
>