[ http://issues.apache.org/jira/browse/AXIS-1917?page=comments#action_63584 ] Peter Tandara-Kuhns commented on AXIS-1917: -------------------------------------------
My apologies, you are correct. It seems that this is a duplicate of Axis-865 (Bugzilla #19744), which has been fixed as you point out. I must have been using Axis 1.1 for my testing, not Axis 1.2 RC3 as reported. > Inherited attributes are not serialized by BeanSerializer > --------------------------------------------------------- > > Key: AXIS-1917 > URL: http://issues.apache.org/jira/browse/AXIS-1917 > Project: Axis > Type: Bug > Components: Serialization/Deserialization > Versions: 1.2RC3 > Reporter: Peter Tandara-Kuhns > Priority: Blocker > > If the WSDL file contains a complexContent extension of a complexType that > has attributes, and the extended type does not itself define any attributes, > the attributes of the base type are not included in the serialized XML stream. > After running the Axis client in the debugger, I noticed the following: > The getObjectAttributes method of org.apache.axis.encoding.ser.BeanSerializer > contains this check: > if (typeDesc == null || !typeDesc.hasAttributes()) > return attributes; > The hasAttributes method of org.apache.axis.description.TypeDesc just checks > if the current bean class has any attributes defined, but does not check for > attributes in any of its parent classes. > I then made this change to the hasAttributes method, which seems to fix the > problem: > public boolean hasAttributes() { > if (_hasAttributes) { > return true; > } > else { > // check superclasses if they exist > Class cls = javaClass.getSuperclass(); > if (cls != null && !cls.getName().startsWith("java.")) { > TypeDesc superDesc = getTypeDescForClass(cls); > if (superDesc != null && superDesc.hasAttributes()) { > return true; > } > } > } > return false; > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
