Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.6.3, 1.7.3
-
None
-
None
-
Windows 10, cygwin, java 1.8.0_60
Description
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 base="EMPL_RCDTypeDef"/></xsd:simpleContent></xsd:complexType>
<xsd:simpleType name="EMPL_RCDTypeDef"><xsd:restriction base="xsd:int"><xsd:totalDigits value="3"/></xsd:restriction></xsd:simpleType>
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 (org.apache.axis2.databinding.utils.ConverterUtil.compare(param, 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(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at org.apache.axis2.databinding.utils.ConverterUtil.compare(ConverterUtil.java:1249)
at com....SomeStub$EMPL_RCDTypeShape2.setEMPL_RCDTypeDef(CI_PRJ_ABSV_RQST_CIStub.java)
Attachments
Attachments
Issue Links
- is caused by
-
AXIS2-4190 WSDL2JAVA Not generating code for <xsd:totalDigits> when databinding is ADB.
- Resolved
- is cloned by
-
AXIS2-5797 CLONE - totalDigits Facet of XSD type int incorrectly treated in databinding
- Resolved
- is duplicated by
-
AXIS2-5789 Generated code for xsd:totalDigits throws NumberFormatException
- Resolved
-
AXIS2-5797 CLONE - totalDigits Facet of XSD type int incorrectly treated in databinding
- Resolved
-
AXIS2-5851 Exception in thread "main" java.lang.NumberFormatException: For input string: "1000.0"
- Resolved
-
AXIS2-5842 wsdl2java generates faulty runtime code for <xsd:totalDigits>
- Closed