Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-788

AXIS C++ allows to set positive values to XSD_negativeInteger type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6 Alpha
    • None
    • None

    Description

      Axis C++ allows to set positive values for XSD_negativeInteger dataype. As per the XML schema specification, the ·value space· of negativeInteger is the infinite set

      {...,-2,-1}

      and it's maxInclusive is -1. This means, only negagtive integer values should be allowed and no positive values. But, I see that positive values can also be set for this datatype. As per my observation,

      1. negativeInteger and nonPositiveInteger types accept positive values ( e.g. +1 is accepted and same value is displayed after serialze/deserialized)
      2. positiveInteger and nonNegativeInteger types accept negative values ( e.g. -1 is accepted and 18446744073709551615 value is displayed after
      serialze/deserialized)

      I think this is not the correct behaviour. Though these XML datatypes are mapped to different datatypes of client programming languages (C/C++ in our case), this should not be allowed while serializing/deserializing in the client product and some exception should be reported indicating the error. I see the whole purpose of a datatype is lost when a +ve value is set for a negativeInteger type and vice versa.

      Testcases written for these types ( XSD_negativeIntegerClient.cpp, XSD_nonPositiveIntegerClient.cpp, XSD_positiveIntegerClient.cpp and XSD_nonNegativeIntegerClient.cpp) show this problem.

      Regards
      Manohar.

      Attachments

        Issue Links

          Activity

            People

              dicka Adrian Dick
              cmanohar Manohar Kumar Chintala
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: