[SWS-868] Add support for SOAP v1.2 Fault to Status Code mapping in WebServiceTemplate Created: 27/Mar/14  Updated: 23/Apr/14  Resolved: 23/Apr/14

Status: Resolved
Project: Spring Web Services
Component/s: Core
Affects Version/s: 2.1.4
Fix Version/s: 2.2.RC1

Type: Improvement Priority: Major
Reporter: Phil McCarley Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


SOAP v1.2 specifies that for SOAP Fault's with Code of "env:Sender" the HTTP response status code should be 400 (rather than 500 for all other faults).


This may need to be looked at on the server side (I haven't checked) but I am particularly interested only in the client side at the moment. I have a service that follows this advice and return the 400 code with the Fault content, however when using WebServiceTemplate with any WebServiceConnection based off AbstractHttpSenderConnection, the hasFault() method of that class will only return true if the code is 500.

Hence the problem that I am facing, which is that the response is simple considered an error and a simple WebServiceTransportException is thrown rather than the more useful SoapFaultClientException.

Comment by Arjen Poutsma [ 23/Apr/14 ]

Fixed on both the client and server-side.

Generated at Fri Nov 16 01:59:25 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.