axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Why it only read 28 bytes
Date Tue, 12 Dec 2006 09:22:44 GMT
On Tue, 2006-12-12 at 11:55 +0800, jim ma wrote:
> 
> Can anyone shed some light on this ?
> 

Jim,

HttpCore uses 2048 byte chunks per default and as far as I know Axis2
SimpleHttpServer does not override this default behavior. 

http://jakarta.apache.org/httpcomponents/httpcore/jakarta-httpcore/xref/org/apache/http/io/ChunkedOutputStream.html#132

I simply do not see a way for HttpCore to produce content chunks less
then 2048. 

Please give me a little more details how to reproduce the problem
locally.

Oleg


> On 12/8/06, jim ma <mail2jimma@gmail.com> wrote:
>         Hi all ,
>         
>         I think this is a bug maybe introduced by
>         jakarta-httpcore-4.0-alpha2.  When enable the chunk mode for
>         StringEntity , client will read 28 bytes each time . Client
>         will read many times when a large payload response returned .
>         This definitely affects Aixs2's performance.  
>         
>         Axis2 need to set chunk buffersize for HttpCore before
>         invoking StringEntity.setChunk(true) ? 
>         
>         Regards
>         
>         Jim
>         
>         
>         On 12/5/06, jim ma <mail2jimma@gmail.com> wrote:
>                 Hi all , 
>                 
>                 I downloaded the aixs2 1.1 std kit and tried a simple
>                 sample contains one operation: echoString() . After I
>                 deployed the service in repository and launch the
>                 server with axis2server.I wrote the following code to
>                 send the payload to aixs2server and soap response : 
>                 
>                 httpCon.getOutputStream().write(payload);
>                 httpCon.getOutputStream().flush();
>                 byte[] buffer = new byte[1024];
>                 count = httpCon.getInputStream().read(buffer);
>                 while (count > 0) {
>                        System.out.println ("---readed----" + count);
>                        count = httpCon.getInputStream().read(buffer);
>                 }
>                 
>                 I found the thing confused me : each time it only can
>                 read 28 bytes from inputStream . Large size respsone
>                 will be readed many times.  But I deployed it into
>                 tomcat , It will read 1024 bytes each time. 
>                 
>                 Which line code in Artix2 1.1 cause this ? 
>                 
>                 Thanks 
>                 
>                 Jim
>                 
>                 
>                 
>                   
>         
>         
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message