Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-308

WebServiceTemplate skips handling fault in response with checkConnectionForFault="false" when HTTP status code is not 200 or 500

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5 RC1
    • Fix Version/s: 1.5 RC2
    • Component/s: Core
    • Labels:
      None

      Description

      When checkConnectionForFault is set to "false" as stated in documentation we should rely on the message only for determining if a response envelope is a Fault.
      This actually works only if HTTP response code is 500 or 200, but as for a service I call the server send an HTTP 400 response code with a response containing a Fault (it's clearly not a WS-I Basic Profile compliant web service) the handleError is called instead of handleFault and I get a WebServiceTransportException instead of the Fault related exception.
      This breaks WS-I Basic Profile conformance of Spring Web Services as it states:
      "... the Profile requires that they examine the envelope. A Fault is an envelope that has a single child element of the soap:Body element, that element being a soap:Fault element.

      R1107 A RECEIVER MUST interpret a SOAP message as a Fault when the soap:Body of the message has a single soap:Fault child."

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          You are correct. I focussed more on:

          R1126 An INSTANCE MUST return a "500 Internal Server Error" HTTP status code if the response envelope is a Fault.

          But R1107 says that the status code should be taken as a hint only.

          Show
          arjen.poutsma Arjen Poutsma added a comment - You are correct. I focussed more on: R1126 An INSTANCE MUST return a "500 Internal Server Error" HTTP status code if the response envelope is a Fault. But R1107 says that the status code should be taken as a hint only.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Fixed, also in 1.0 branch.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Fixed, also in 1.0 branch.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing issues for 1.5.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.5.

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              montebove Luciano Montebove
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: