Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 63076 invoked by uid 500); 2 Dec 2002 16:35:50 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 63065 invoked from network); 2 Dec 2002 16:35:50 -0000 Message-ID: <3DEB8B83.2070707@curalia.se> Date: Mon, 02 Dec 2002 17:34:11 +0100 From: =?ISO-8859-1?Q?Martin_Kal=E9n?= Organization: Curalia AB User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: sv, en, en-us MIME-Version: 1.0 To: axis-dev@xml.apache.org Subject: Bug in property inheritance logic in BeanSerializer.writeSchema(Class, Types)? Content-Type: multipart/mixed; boundary="------------020601080501060505030809" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------020601080501060505030809 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 --------------020601080501060505030809 Content-Type: text/plain; name="BeanSerializer.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="BeanSerializer.diff" 315c315 < superPd = typeDesc.getPropertyDescriptors(); --- > superPd = superTypeDesc.getPropertyDescriptors(); --------------020601080501060505030809--