[SWS-485] xml:lang="en" attribute in <faultstring> element is not compliant to SOAP/1.1 schema Created: 12/Feb/09  Updated: 04/May/12  Resolved: 13/May/09

Status: Closed
Project: Spring Web Services
Component/s: None
Affects Version/s: 1.5.1
Fix Version/s: 1.5.7

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

Issue Links:
is duplicated by SWS-487 CLONE -xml:lang="en" attribute in <fa... Closed
Reference URL: http://forum.springframework.org/showthread.php?t=65135


There is xml:lang="en" attribute in <faultstring> element although SOAP/1.1 schema doesn't provide it.
Yes, it may be suppressed if set faultStringOrReasonLocale property for all affected endpoints to null,
set empty language for each and every exception mapping in SoapFaultMappingExceptionResolver (BTW, it is not
very well documented how to do it), set to null faultStringOrReasonLocale for message dispatcher,
oh did I forget something?

Probably, it may as well be avoided by subclassing of each of above mentioned classes (and likely some others),
but then each developer need to use them.

See as well http://www.eviware.com/component/option,com_smf/Itemid,53/topic,1044.0

IMHO, or it should comply with schema by default, or, in the worst case, it should exist some global setting
"be compliant".

Kind regards,

Comment by Arjen Poutsma [ 12/Feb/09 ]

In fact, the xml:lang element is valid. See http://www.ws-i.org/Profiles/BasicProfile-1.1.html#SOAP_Fault_Language

Comment by Oleksandr Alesinskyy [ 12/Feb/09 ]

O dare to disagree - official definition of SOAP schema is here http://schemas.xmlsoap.org/soap/envelope/ (as stated at http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507) and it does not contain lang attribute for faultstring element.

I can only guess why WS-I provided non-compliant profile, likely due to many violations "in the field", but I doubt that it has right to change definitions of W3C.

Anyway, it is a valid reason to not change defaults, but not valid reason to blantantly decline providing of some kind of "global switch" between strict (W3C) and relaxed (WS-I) compliance.

I would say that client better follow WS-I but servers (with unlimited circle of clients, as in our case) should follows more strict restrictions of W3C.

Comment by Arjen Poutsma [ 17/Feb/09 ]

Ok, we will take a look at this for 1.5.7.

Comment by Arjen Poutsma [ 13/May/09 ]

I've added the langAttributeOnSoap11FaulString property to both the SaajSoapMessageFactory, and AxiomSoapMessageFactory, which defaults to true. If set to false, the xml:lang attribute will not be added to SOAP 1.1 faults.

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Sun Oct 21 14:24:27 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.