[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


 Description   

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).

http://www.w3.org/TR/2007/REC-soap12-part2-20070427/#tabresstatereccodes

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.



 Comments   
Comment by Arjen Poutsma [ 23/Apr/14 ]

Fixed on both the client and server-side.

Generated at Tue Dec 12 15:48:57 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.