You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Vyacheslav Zhakov <zh...@genesyslab.com> on 2001/10/31 07:46:05 UTC
Connection: Keep-Alive
My goal is to keep connection between soap4j client and a SOAP server. I
extended class SOAPHTTPConnection in order to define additional header
element "Connection: Keep-Alive". The client hangs up in this case, because
standard implementation hangs up in constructor ByteArrayDataSource:
while (true){
len = is.read(buf);
if (len < 0)
break;
os.write(buf, 0, len);
}
Did somebody try to avoid this without re-implementing too much code?
Thanks.
Re: Connection: Keep-Alive
Posted by Scott Nichol <sn...@computer.org>.
I do not know of anyone who implemented Keep-Alive. You should be able to
do it without adding too much code, but you will have some performance hit.
Basically, you must read the header information to get the Content-length,
then you can read the body by reading that many bytes.
Scott
----- Original Message -----
From: "Vyacheslav Zhakov" <zh...@genesyslab.com>
To: <so...@xml.apache.org>
Sent: Wednesday, October 31, 2001 1:46 AM
Subject: Connection: Keep-Alive
> My goal is to keep connection between soap4j client and a SOAP server. I
> extended class SOAPHTTPConnection in order to define additional header
> element "Connection: Keep-Alive". The client hangs up in this case,
because
> standard implementation hangs up in constructor ByteArrayDataSource:
>
> while (true){
> len = is.read(buf);
> if (len < 0)
> break;
> os.write(buf, 0, len);
> }
>
> Did somebody try to avoid this without re-implementing too much code?
>
> Thanks.
>
Re: Connection: Keep-Alive
Posted by Scott Nichol <sn...@computer.org>.
I do not know of anyone who implemented Keep-Alive. You should be able to
do it without adding too much code, but you will have some performance hit.
Basically, you must read the header information to get the Content-length,
then you can read the body by reading that many bytes.
Scott
----- Original Message -----
From: "Vyacheslav Zhakov" <zh...@genesyslab.com>
To: <so...@xml.apache.org>
Sent: Wednesday, October 31, 2001 1:46 AM
Subject: Connection: Keep-Alive
> My goal is to keep connection between soap4j client and a SOAP server. I
> extended class SOAPHTTPConnection in order to define additional header
> element "Connection: Keep-Alive". The client hangs up in this case,
because
> standard implementation hangs up in constructor ByteArrayDataSource:
>
> while (true){
> len = is.read(buf);
> if (len < 0)
> break;
> os.write(buf, 0, len);
> }
>
> Did somebody try to avoid this without re-implementing too much code?
>
> Thanks.
>