Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-485

xml:lang="en" attribute in <faultstring> element is not compliant to SOAP/1.1 schema

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.5.7
    • Component/s: None
    • Labels:
      None

      Description

      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,
      Oleksandr

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -
          Show
          arjen.poutsma Arjen Poutsma added a comment - In fact, the xml:lang element is valid. See http://www.ws-i.org/Profiles/BasicProfile-1.1.html#SOAP_Fault_Language
          Hide
          al0 Oleksandr Alesinskyy added a comment -

          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.

          Show
          al0 Oleksandr Alesinskyy added a comment - 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.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

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

          Show
          arjen.poutsma Arjen Poutsma added a comment - Ok, we will take a look at this for 1.5.7.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          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.

          Show
          arjen.poutsma Arjen Poutsma added a comment - 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.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing old issues

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing old issues

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              al0 Oleksandr Alesinskyy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: