axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: cvs commit: xml-axis/java/src/org/apache/axis/soap SOAPConnectionImpl.java
Date Thu, 11 Jul 2002 12:09:59 GMT
Rick,

I totally understand your point of view. In this particular case, we were receiving a 
"Connection reset by peer: JVM_recv in socket input stream read" exception in one of the SAAJ
test
cases. When i went through the debugger (on both ends, one after another), i noticed that
the
server would reply back with an answer without waiting for the full POST of the SOAP message.
So
by the time we sent the rest of the request the socket would close on the server-side and
we got
the "Connection reset by peer" exception and fail the test. IMHO, we should not fail in this
scenario as this scenario can exist when we talk to SOAP stacks from other vendors. Is this
a
wrong assumption? This was the MAIN reason for the fix and the intention was NOT to do the
patch
just to pass the TCK.   

Thanks,
dims

--- Rick Rineholt <rineholt@us.ibm.com> wrote:
> Dims,
> I'm not seeing anything right of the bat that  I *think* breaks anything -
> nor hurts Axis, so no "minus one" :-)
> However, if I put on my "righteous" cap, I don't like putting these changes
> in to "pass" the test when there was nothing wrong on our side, because
> this means now if I,  or some one else changes it unknowingly they the
> break  (IMO the already broken) test.  IMO the *righteous* thing to do is
> fix the test .... this has nothing to do with JAX-RPC, etc... If we later
> for some reason find that flushing is good for SOME reason then were hosing
> the test.  However, I'm too bandwidth limit to keep that "hat"  for more
> than just the duration of  this note as are probably you.
> 
> 
> Rick Rineholt
> "The truth is out there...  All you need is a better search engine!"
> 
> rineholt@us.ibm.com
> 
> 
> 
> dims@apache.org on 07/10/2002 04:19:17 PM
> 
> Please respond to axis-dev@xml.apache.org
> 
> To:    xml-axis-cvs@apache.org
> cc:
> Subject:    cvs commit: xml-axis/java/src/org/apache/axis/soap
>        SOAPConnectionImpl.java
> 
> 
> 
> dims        2002/07/10 13:19:17
> 
>   Modified:    java/src/org/apache/axis/transport/http HTTPSender.java
>                java/src/org/apache/axis/soap SOAPConnectionImpl.java
>   Log:
>   - Improve SAAJ compliance of SOAPConnectionImpl
>   - Fix bug found when running TCK (Flush ONLY once when not doing HTTP 1.1
>   chunking).
> 
>   Revision  Changes    Path
>   1.77      +21 -15
>   xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java
> 
>   Index: HTTPSender.java
>   ===================================================================
>   RCS file:
>   /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/HTTPSender.java,v
> 
>   retrieving revision 1.76
>   retrieving revision 1.77
>   diff -u -r1.76 -r1.77
>   --- HTTPSender.java   9 Jul 2002 12:54:53 -0000     1.76
>   +++ HTTPSender.java   10 Jul 2002 20:19:17 -0000    1.77
>   @@ -379,25 +379,31 @@
> 
>            OutputStream out = sock.getOutputStream();
> 
>   -        out.write(header.toString()
>   -                .getBytes(HTTPConstants.HEADER_DEFAULT_CHAR_ENCODING));
>   -        out.flush();
>   -        ChunkedOutputStream chunkedOutputStream = null;
>            if (httpChunkStream) {
>   -            out = chunkedOutputStream = new ChunkedOutputStream(out);
>   -        }
>   -
>   -        out = new BufferedOutputStream(out, 8 * 1024);
>   -        try {
>   -            reqMessage.writeTo(out);
>   -        } catch (SOAPException e) {
>   -            log.error(JavaUtils.getMessage("exception00"), e);
>   -        }
>   -        if (null != chunkedOutputStream) {
>   +            out.write(header.toString()
>   +
>   .getBytes(HTTPConstants.HEADER_DEFAULT_CHAR_ENCODING));
>   +            out.flush();
>   +            ChunkedOutputStream chunkedOutputStream = new
>   ChunkedOutputStream(out);
>   +            out = new BufferedOutputStream(chunkedOutputStream, 8 *
>   1024);
>   +            try {
>   +                reqMessage.writeTo(out);
>   +            } catch (SOAPException e) {
>   +                log.error(JavaUtils.getMessage("exception00"), e);
>   +            }
>                out.flush();
>                chunkedOutputStream.eos();
>   +        } else {
>   +            out = new BufferedOutputStream(out, 8 * 1024);
>   +            try {
>   +                out.write(header.toString()
>   +
>   .getBytes(HTTPConstants.HEADER_DEFAULT_CHAR_ENCODING));
>   +                reqMessage.writeTo(out);
>   +            } catch (SOAPException e) {
>   +                log.error(JavaUtils.getMessage("exception00"), e);
>   +            }
>   +            // Flush ONLY once.
>   +            out.flush();
>            }
>   -        out.flush();
>            if (log.isDebugEnabled()) {
>                log.debug(JavaUtils.getMessage("xmlSent00"));
>                log.debug("
>                ---------------------------------------------------");
> 
> 
> 
>   1.5       +3 -0
>   xml-axis/java/src/org/apache/axis/soap/SOAPConnectionImpl.java
> 
>   Index: SOAPConnectionImpl.java
>   ===================================================================
>   RCS file:
>   /home/cvs/xml-axis/java/src/org/apache/axis/soap/SOAPConnectionImpl.java,v
> 
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- SOAPConnectionImpl.java 29 Jun 2002 18:05:19 -0000    1.4
>   +++ SOAPConnectionImpl.java 10 Jul 2002 20:19:17 -0000    1.5
>   @@ -83,6 +83,9 @@
>         */
>        public SOAPMessage call(SOAPMessage request, Object endpoint)
>            throws SOAPException {
>   +        if(closed){
>   +            throw new
>   SOAPException(org.apache.axis.utils.JavaUtils.getMessage
>   ("connectionClosed00"));
>   +        }
>            try {
>                Call call = new Call(endpoint.toString());
>                SOAPEnvelope env =
>                ((org.apache.axis.Message)request).getSOAPEnvelope();
> 
> 
> 
> 
> 


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

Mime
View raw message