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

SoapFaultMappingExceptionResolver not handling exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1 RC1
    • Fix Version/s: 2.1 GA
    • Component/s: Core
    • Labels:
      None

      Description

      Given the following configuration:

          <bean class="org.springframework.ws.soap.server.endpoint.SoapFaultMappingExceptionResolver">
              <property name="exceptionMappings">
                  <value>
                      org.springframework.dao.EmptyResultDataAccessException=CLIENT,Entity not found
                  </value>
              </property>
              <property name="defaultFault" value="SERVER"/>
          </bean>

      The result in 2.0.5 is correct:

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
              <SOAP-ENV:Header/>
              <SOAP-ENV:Body>
                  <SOAP-ENV:Fault>
                      <faultcode>SOAP-ENV:Client</faultcode>
                      <faultstring xml:lang="en">Entity not found</faultstring>
                  </SOAP-ENV:Fault>
              </SOAP-ENV:Body>
          </SOAP-ENV:Envelope>

      The result in 2.1.0.RC1 is INCORRECT:

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
          <SOAP-ENV:Header/>
          <SOAP-ENV:Body>
              <SOAP-ENV:Fault>
                  <faultcode>SOAP-ENV:Server</faultcode>
                  <faultstring xml:lang="en">Incorrect result size: expected 1, actual 0</faultstring>
              </SOAP-ENV:Fault>
          </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

        Issue Links

          Activity

          arjen.poutsma Arjen Poutsma logged work - 29/May/12 4:03 AM
          • Time Spent:
            2h 1m
             
            <No comment>

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              gordonad Gordon Dickens
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 2h 1m
                2h 1m