Index: src/org/apache/axis/encoding/ser/BeanSerializerFactory.java =================================================================== --- src/org/apache/axis/encoding/ser/BeanSerializerFactory_old.java 2007-03-28 08:29:06.419100000 -0500 +++ src/org/apache/axis/encoding/ser/BeanSerializerFactory.java 2007-03-28 08:50:58.348203600 -0500 @@ -17,7 +17,6 @@ package org.apache.axis.encoding.ser; import java.io.IOException; -import java.lang.reflect.Method; import java.util.StringTokenizer; import org.apache.axis.Constants; @@ -86,42 +85,24 @@ TypeDesc td = new TypeDesc(c, true); td.setXmlType(new QName(uri, type)); - - Method[] methods = c.getMethods(); - for (int i = 0; i < methods.length; i++) { - Class declaringClass = methods[i].getDeclaringClass(); - String name = methods[i].getName(); - - // check if we found a valid "bean method", and then add it to the - // collection. - //we only look for "get" not "set" because of java beans get/set - // model - if (!declaringClass.equals(Object.class) && name.length() > 3 - && (name.startsWith("get"))) { - - StringBuffer buf = new StringBuffer(); - // append the "raw" name - buf.append(name); - // remove the get/set prefix - buf.delete(0, 3); - // make sure first char is lowercase - buf.replace(0, 1, buf.substring(0, 1).toLowerCase()); - - ElementDesc elemField = new ElementDesc(); - elemField.setFieldName(buf.toString()); - String declURI = convertToURI(methods[i].getDeclaringClass()); - elemField.setXmlName(new QName(declURI, buf.toString())); - elemField.setNillable(true); - - if (methods[i].getReturnType().isArray()) { - QName itemQName = new QName(Constants.QNAME_LITERAL_ITEM - .getNamespaceURI(), Constants.QNAME_LITERAL_ITEM - .getLocalPart()); - elemField.setItemQName(itemQName); - } - - td.addFieldDesc(elemField); + + BeanPropertyDescriptor[] propertyDescriptors = BeanUtils.getPd(c); + for(int i = 0; i < propertyDescriptors.length; i++) { + BeanPropertyDescriptor p = propertyDescriptors[i]; + String propertyName = p.getName(); + ElementDesc elemField = new ElementDesc(); + elemField.setFieldName(propertyName); + String declURI = convertToURI(p.getDeclaringClass()); + elemField.setXmlName(new QName(declURI, propertyName)); + elemField.setNillable(true); + if(p.isArray()) { + QName itemQName = new QName(Constants.QNAME_LITERAL_ITEM + .getNamespaceURI(), Constants.QNAME_LITERAL_ITEM + .getLocalPart()); + elemField.setItemQName(itemQName); } + + td.addFieldDesc(elemField); } if (td != null && c != null) { Index: src/org/apache/axis/encoding/SerializationContext =================================================================== --- src/org/apache/axis/encoding/SerializationContext_old.java 2007-03-28 08:47:57.771234300 -0500 +++ src/org/apache/axis/encoding/SerializationContext.java 2007-03-28 08:46:20.834354700 -0500 @@ -1504,7 +1504,7 @@ //Make sure arrays "item" tag is given a correct namespace //only tested using document/literal wrapped - if (elemQName.getNamespaceURI() == "") { + if ("".equals(elemQName.getNamespaceURI())) { elemQName = new QName(this.nsStack.getNamespaceURI(""), elemQName.getLocalPart()); } Index: src/org/apache/axis/utils/BeanPropertyDescriptor =================================================================== --- src/org/apache/axis/utils/BeanPropertyDescriptor_old.java 2007-03-28 08:49:37.489346100 -0500 +++ src/org/apache/axis/utils/BeanPropertyDescriptor.java 2007-03-28 08:41:06.242618100 -0500 @@ -237,4 +237,19 @@ public Class getActualType() { return myPD.getPropertyType(); } + + + public Class getDeclaringClass() { + Method readMethod = myPD.getReadMethod(); + if(readMethod != null) { + return readMethod.getDeclaringClass(); + } else { + Method writeMethod = myPD.getWriteMethod(); + if(writeMethod != null) { + return writeMethod.getDeclaringClass(); + } else { + return null; + } + } + } } Index: src/org/apache/axis/utils/FieldPropertyDescriptor =================================================================== --- src/org/apache/axis/utils/FieldPropertyDescriptor_old.java 2007-03-28 08:48:41.161581600 -0500 +++ src/org/apache/axis/utils/FieldPropertyDescriptor.java 2007-03-28 08:41:34.554936900 -0500 @@ -150,4 +150,9 @@ public Field getField() { return field; } + + + public Class getDeclaringClass() { + return field.getDeclaringClass(); + } }