Hello all,
I have probably come across a bug in the BeanSerializer and want some input on this, since I'm new to the AXIS community. The attached diff is made against the source drop from Nov 27 2002 and the affected file is:
xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java
method:
public Element writeSchema(Class javaType, Types types)

The original code fetches the type descriptor for the super class on line 313:
TypeDesc superTypeDesc = TypeDesc.getTypeDescForClass(superClass);
but user the current class' type descriptor for access on line 315:
superPd = typeDesc.getPropertyDescriptors();

This gives the following exception (brief) when using beans with complex types and inheritance:
java.lang.NullPointerException at
org.apache.axis.encoding.ser.BeanSerializer.writeSchema(BeanSerializer.java:315)
org.apache.axis.wsdl.fromJava.Types.makeTypeElement(Types.java:1276)
org.apache.axis.wsdl.fromJava.Types.writeTypeForPart(Types.java:326)
org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1250)
org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1110)
org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:862)
org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:819)
org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:387)
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:268)

When changing BeanSerializer according to the supplied (trivial) diff, this works fine.

Should this be filed as a bugzilla entry?

--
Regards,
Martin Kalén
Curalia AB
315c315
<                 superPd = typeDesc.getPropertyDescriptors();
---
>                 superPd = superTypeDesc.getPropertyDescriptors();


Reply via email to