axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Krauß <tobias.kra...@ic-consult.de>
Subject [Axis2] Generated code for xsd:totalDigits cause errors
Date Fri, 27 Jan 2017 12:54:55 GMT
Dear Mr/Ms,

today I found a bug in the generated sources of an axis2 client. I use Axis2 version 1.7.4.
This code is always generated if “xsd:totalDigits” is used in the processed wsdl file.
After that I searched for an equal Issue and found that this problem occurred in version 1.6.3
as well (Issue AXIS2-5342<https://issues.apache.org/jira/browse/AXIS2-5342>).
I tested this Issue with the build in shell script “wsdl2java.sh” and the maven plugin
“axis2-wsdl2code-maven-plugin”.
Both methods generated the same source code which leads to a NumberFormatException:

/**
* Auto generated setter method
* @param param ErrorCode_type0
*/
public void setErrorCode_type0(java.math.BigInteger param) {
    java.lang.String totalDigitsDecimal =org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation(
            "3").toPlainString();

    if (org.apache.axis2.databinding.utils.ConverterUtil.compare(
               param, totalDigitsDecimal) < 0) {
         this.localErrorCode_type0 = param;
    } else {
        throw new java.lang.RuntimeException(
            "Input values do not follow defined XSD restrictions");
    }
}
Is this Issue known for version 1.7.4?
Is there a workaround?

Thank you in advance.


Mit freundlichen Grüßen / Best regards
Tobias Krauß
--
Tobias Krauß
Consultant
M +49 151 16369749

tobias.krauss@ic-consult.de<mailto:tobias.krauss@ic-consult.de>
www.ic-consult.com

iC Consult Gesellschaft für Systemintegration und Kommunikation mbH
Standort: Zettachring 8a | 70567 Stuttgart | Germany
Verwaltung: Huyssenallee 99-103 | 45128 Essen | Germany
Geschäftsführer: Dipl.-Phys. Jürgen Biermann, Dr. Andreas Neumann
HRB 116170 Amtsgericht München

Mime
View raw message