You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Rob Audenaerde (Jira)" <ji...@apache.org> on 2022/08/17 14:06:00 UTC

[jira] [Created] (AXIS2-6041) totalDigits Facet of XSD type short incorrectly treated in databinding

Rob Audenaerde created AXIS2-6041:
-------------------------------------

             Summary: totalDigits Facet of XSD type short incorrectly treated in databinding
                 Key: AXIS2-6041
                 URL: https://issues.apache.org/jira/browse/AXIS2-6041
             Project: Axis2
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.8.2
            Reporter: Rob Audenaerde


I think this is the same problem as AXIS2-5724.

{{<xsd:simpleType name="Volgnummer">}}
{{<xsd:annotation>}}
{{<xsd:documentation>}}
{{Een getal tussen de 1 en 20.}}
{{</xsd:documentation>}}
{{</xsd:annotation>}}
{{<xsd:restriction base="xsd:short">}}
{{<xsd:minInclusive value="1" />}}
{{<xsd:maxInclusive value="20" />}}
{{<xsd:totalDigits value="2" />}}
{{</xsd:restriction>}}
{{</xsd:simpleType>}}

{{Results in:}}

 

{{public void setVolgnummer(short param) {}}

{{java.lang.String totalDigitsDecimal =}}
{{org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation("2")}}
{{.toPlainString();}}
{{if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, totalDigitsDecimal) < 0) {}}
{{this.localVolgnummer = param;}}
{{} else {}}
{{throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");}}
{{}}}
{{}}}

But the {{totalDigitsDecimal will be filled with 100.0, which cannot be converted to short.}}

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org