HTTPSender does not throw exceptions on HTTP Status code 500
------------------------------------------------------------

         Key: AXIS-2318
         URL: http://issues.apache.org/jira/browse/AXIS-2318
     Project: Apache Axis
        Type: Bug
    Versions: 1.2    
    Reporter: Jeff Saremi


I noticed that when a server returns an HTTP status code of 500, my SOAP client 
keeps on reading the message (which is some html) and tries to parse it as XML. 
Therefore, instead of getting an AxisFault on the return code, I get one on the 
SAX parser.
I trace the code and here is where it fails to raise an exception:
HTTPSender.readFromSocket()

        if ((returnCode > 199) && (returnCode < 300)) {
...
            // SOAP return is OK - so fall through
        } else if (msgContext.getSOAPConstants() ==
                SOAPConstants.SOAP12_CONSTANTS) {
            // For now, if we're SOAP 1.2, fall through, since the range of
            // valid result codes is much greater
        } else if ((contentType != null) && !contentType.startsWith("text/html")
                && ((returnCode > 499) && (returnCode < 600))) {
            // SOAP Fault should be in here - so fall through
        } else if ((location != null) &&
      

The condition block that gets executed is " // SOAP Fault should be in here - 
so fall through" however, later in the code no exception is raised.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to