axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: Bug in property inheritance logic in BeanSerializer.writeSchema(Class, Types)?
Date Mon, 02 Dec 2002 17:12:57 GMT
Martin,

Please create a bugzilla entry with a test case as well.

Thanks,
dims

--- Martin_KalÚn <martin.kalen@curalia.se> wrote:
> 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();
> 


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Mime
View raw message