axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Greif (work) (JIRA)" <>
Subject [jira] [Created] (AXIS2-5724) totalDigits Facet of XSD type int incorrectly treated in databinding
Date Fri, 09 Oct 2015 00:32:27 GMT
Jeff Greif (work) created AXIS2-5724:

             Summary: totalDigits Facet of XSD type int incorrectly treated in databinding
                 Key: AXIS2-5724
             Project: Axis2
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.6.3
         Environment: Windows 10, cygwin, java 1.8.0_60
            Reporter: Jeff Greif (work)
            Priority: Minor

Note: I could not enter the release I'm using: 1.6.2.

The following XSD fragment 
<xsd:complexType name="EMPL_RCDTypeShape"><xsd:simpleContent><xsd:extension
<xsd:simpleType name="EMPL_RCDTypeDef"><xsd:restriction base="xsd:int"><xsd:totalDigits

produces, in a stub generated by wsdl2java
public void setEMPL_RCDTypeDef(int param){

    java.lang.String totalDigitsDecimal = org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation("3").toString();
    if (, totalDigitsDecimal)
> 0){
    else {
       throw new java.lang.RuntimeException();

The string value of totalDigitsDecimal is "1000.0", rather than "1000", or  some different
method should have been called to convert totalDigits to a string, causing the error seen
in this stacktrace snippet:

Caused by: java.lang.NumberFormatException: For input string: "1000.0"
    at java.lang.NumberFormatException.forInputString(
    at java.lang.Integer.parseInt(
    at java.lang.Integer.parseInt(
    at com....SomeStub$EMPL_RCDTypeShape2.setEMPL_RCDTypeDef(

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message