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

          gordonad Gordon Dickens created issue -
          arjen.poutsma Arjen Poutsma made changes -
          Field Original Value New Value
          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>
          Given the following configuration:

          {code:xml}
              <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>
          {code}

          The result in 2.0.5 is correct:
          {code}
          <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>
          {code}

          The result in 2.1.0.RC1 is INCORRECT:
          {code:xml}
          <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>
          {code}
          Fix Version/s 2.1 GA [ 12851 ]
          arjen.poutsma Arjen Poutsma made changes -
          Description Given the following configuration:

          {code:xml}
              <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>
          {code}

          The result in 2.0.5 is correct:
          {code}
          <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>
          {code}

          The result in 2.1.0.RC1 is INCORRECT:
          {code:xml}
          <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>
          {code}
          Given the following configuration:

          {code:xml}
              <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>
          {code}

          The result in 2.0.5 is correct:
          {code:xml}
          <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>
          {code}

          The result in 2.1.0.RC1 is INCORRECT:
          {code:xml}
          <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>
          {code}
          arjen.poutsma Arjen Poutsma made changes -
          Link This issue relates to SWS-772 [ SWS-772 ]
          arjen.poutsma Arjen Poutsma made changes -
          Assignee Arjen Poutsma [ arjen.poutsma ]
          arjen.poutsma Arjen Poutsma made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          arjen.poutsma Arjen Poutsma made changes -
          Time Spent 2h 1m [ 7260 ]
          Worklog Id 28719 [ 28719 ]
          arjen.poutsma Arjen Poutsma made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          arjen.poutsma Arjen Poutsma made changes -
          Link This issue is duplicated by SWS-793 [ SWS-793 ]

            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