Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5978

provide better error message on error with trailing spaces

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.7.8
    • None
    • databinding
    • None

    Description

      When there is a trailing space, a useless error message is given via AxisFault.

      Assume you should have entered "a" in a field and happend to give "a ", you see

       

      IllegalArgumentException " data=[a ]"

       

      suggestions:

      1) subclass IllegalArgumentException with 2 extra fields:

      a) the calling class name (generated for the xsd field by wsdl2java), must be handed over to  org.apache.axis2.databinding.utils.ConverterUtil.convertToToken() as a optional 2nd argument

      b) a reference to the explanation as per https://www.w3.org/TR/xmlschema-2/#token

       should be set in org.apache.axis2.databinding.types.setValue() when

          !Token.isValid(stValue)

        

      see also AXIS2-5575

      Attachments

        Activity

          People

            Unassigned Unassigned
            hauser@acm.org Ralf Hauser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: