Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 88205 invoked from network); 12 May 2006 20:26:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 May 2006 20:26:17 -0000 Received: (qmail 99503 invoked by uid 500); 12 May 2006 20:26:10 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 99189 invoked by uid 500); 12 May 2006 20:26:09 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 99167 invoked by uid 99); 12 May 2006 20:26:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 May 2006 13:26:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of davanum@gmail.com designates 64.233.162.201 as permitted sender) Received: from [64.233.162.201] (HELO nz-out-0102.google.com) (64.233.162.201) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 May 2006 13:26:08 -0700 Received: by nz-out-0102.google.com with SMTP id m22so490131nzf for ; Fri, 12 May 2006 13:25:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=W+AgXYoo+pTrJg+DedriJvMQjeSXyuHPdbXyv+oHqKYQQddDEqA0fGb42w/TQADMGzMbX6IaomOiJdMYN0tr/38TvXWdj4FmeBb94lBRUenH721ohOrG8jzOY5yCakbCsXPvtqBYBGhYq1YVUg4P53hon6GS2C7+t9gdz5HHM7o= Received: by 10.36.12.11 with SMTP id 11mr186191nzl; Fri, 12 May 2006 13:25:47 -0700 (PDT) Received: by 10.36.68.8 with HTTP; Fri, 12 May 2006 13:25:47 -0700 (PDT) Message-ID: <19e0530f0605121325i72ec6111x6cc2be8a2eccad17@mail.gmail.com> Date: Fri, 12 May 2006 16:25:47 -0400 From: "Davanum Srinivas" Reply-To: dims@apache.org To: axis-dev@ws.apache.org Subject: Re: [AXIS] 1.4 WSDL2Java generates non-compilable code In-Reply-To: <031801c6746e$056e0a00$8e6bfb52@Pentium4> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <031801c6746e$056e0a00$8e6bfb52@Pentium4> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sure. Please submit a patch thanks, dims On 5/10/06, Remy Bertrand wrote: > > > When WSDL contains in type definitions, wsdl2java can > generate non compilable code. > > I have identified 2 cases of non compilable code : > > - Generated class don't extends anything, but a constructor calling > super(...) is generated (in this case super refer to java.lang.Object). > - Generated class don't extends anything, a constructor initializing each > attribute is generated, but attribute name is replaced by "paramx". > > I wrote the attached wsdl that reproduce the two cases. Please focus on t= he > schema part only, rest of the file is a poor cut and paste. > > > After looking in the code > (wsdl/toJava/JavaBeanWriter.java), my understanding is that > tests to decide if a class extends another or not (and thus what > constructor(s) must be outputted) are not coherent. > > - In method writeFullConstructor(), a test type.isSimpleType() is done to > check if constructor must be written. > - In method writeSimpleConstructors(), a test extendType !=3D null is don= e to > check if constructor must be written. > - In method getExtendsText() (which is called to generate the "extends" > statement at the beginning of the class), a more complex test is used: > (extendType !=3D null) && !isUnion() && (!type.isSimpleType() || > !extendType.isBaseType()) && (extendType.getDimensions().length() =3D=3D = 0) > > Thats why sometimes writeFullConstructor emits a constructor calling > super(...) even if the class don't really inherits from anything. > Or why writeSimpleConstructors emits a constructor to initialize every > attributes even if the informations to write this constructor are not > available. > > > If you agree with my analyze, i can open a JIRA reports and submit a patc= h > that i wrote trying to resolve the problem on my (multiple) wsdl. > > Thanks > R=E9my Bertrand > > > --=20 Davanum Srinivas : http://wso2.com/blogs/