Author: senaka Date: Thu Dec 23 03:25:18 2010 New Revision: 1052164 URL: http://svn.apache.org/viewvc?rev=1052164&view=rev Log: Fixing JIRA Issue AXIS2-3723. Thanks Wicus Ross for the patch.
Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=1052164&r1=1052163&r2=1052164&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Thu Dec 23 03:25:18 2010 @@ -181,6 +181,21 @@ public class BeanUtil { Class<?> ptype = property.getPropertyType(); Method readMethod = property.getReadMethod(); + if (readMethod == null) { + Class propertyType = property.getPropertyType(); + if (propertyType == java.lang.Boolean.class) { + Method writeMethod = property.getWriteMethod(); + if (writeMethod != null) { + String tmpWriteMethodName = writeMethod.getName(); + PropertyDescriptor tmpPropDesc = + new PropertyDescriptor(property.getName(), + beanObject.getClass(), + "is" + tmpWriteMethodName.substring(3), + tmpWriteMethodName); + readMethod = tmpPropDesc.getReadMethod(); + } + } + } Object value; if (readMethod != null) { readMethod.setAccessible(true);