findGetterForProperty() method doesn't recognized Boolean type
Hi All,
I am using wsdl2java to generate my model classes from the WSDL file. Some of the the properties are of type (xs:boolean). So when it generate the model class it create the getter and setter as follow:
Code:
public void setXXX(...) { ... }
public Boolean getXXX() { return .... }
Now when I use Spring mapper to map such Boolean data type I am getting error
Code:
org.springframework.expression.spel.SpelEvaluationException: EL1008E:(pos 0): Field or property 'XXX' cannot be found on object of type 'com.anjib.beans.MyDto'
This can be avoided if I manually change all "Boolean" to "boolean" in model class generated by wsdl2java. This is because findGetterForProperty() method of org.springframework.expression.spel.support.Reflec tivePropertyAccessor return
Code:
class java.lang.Boolean
as type for Boolean and
Code:
boolean.class.equals(method.getReturnType())
in findGetterForProperty() method return false.
Is there any other option/technique I can used to avoid such manual change?
Any help is appreciated.