axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kalén <martin.ka...@curalia.se>
Subject Bug in property inheritance logic in BeanSerializer.writeSchema(Class, Types)?
Date Mon, 02 Dec 2002 16:34:11 GMT
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

Mime
View raw message