Skip to content

SoapFaultMappingExceptionResolver not handling exception [SWS-777] #861

@gregturn

Description

@gregturn

Gordon Dickens opened SWS-777 and commented

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>

Affects: 2.1 RC1

Issue Links:

Referenced from: commits 504e6b7

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions