[
http://issues.apache.org/jira/browse/AXIS-1917?page=comments#action_63479 ]
Venkat Reddy commented on AXIS-1917:
------------------------------------
I see that the Typedesc.hasAttributes method also has the following chunk of
code
if (canSearchParents) {
if (parentDesc != null) {
return parentDesc.hasAttributes();
}
}
Is this result of applying a patch for this problem?
Also, the test case at test/wsdl/extensibility seems to demonstrate the
atributes of the base extension are also serialized (in this case, i can see
the subject attribute of BookType being serialized as part of derivde type
MizedType1).
- venkat
> 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