I'm attempting to generate Java code from a WSDL
file. It generates the code but there seems to be an issue with one of the auto generated setter methods.
/**
* Auto generated setter method
* @param param Curr132
*/
public void setCurr132(java.math.BigDecimal param){
java.lang.String totalDigitsDecimal = org.apache.axis2.databinding.utils.ConverterUtil.convertToStandardDecimalNotation("13").toString();
if (org.apache.axis2.databinding.utils.ConverterUtil.compare(param,totalDigitsDecimal) > 0){
this.localCurr132=param;
} else {
throw new java.lang.RuntimeException();
}
}
Whenever I create a new Curr132
object and use setCurr132
, it throws the RuntimeException
.
The problem seems to be the '>'. If I change that to a '<' it works. Is this the correct fix?
Most Obvious, Don't change the operator rather change the param value, because as per param value, if condition fails. i hope, you aware of what compare method returns. if not look at here. Hence the exception thrown in the else blog.
在Java中,将setCurr132()设为以下对象
java.math.BigDecimal param=new java.math.BigDecimal(3.0E13);
setCurr132(param);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.