Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 98468 invoked from network); 21 Feb 2005 15:54:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Feb 2005 15:54:19 -0000 Received: (qmail 56693 invoked by uid 500); 21 Feb 2005 15:54:12 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 56679 invoked by uid 500); 21 Feb 2005 15:54:11 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 56665 invoked by uid 99); 21 Feb 2005 15:54:11 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of dinoch@microsoft.com designates 131.107.3.124 as permitted sender) Received: from mail2.microsoft.com (HELO mail2.microsoft.com) (131.107.3.124) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 21 Feb 2005 07:54:10 -0800 Received: from mailout1.microsoft.com ([157.54.1.117]) by mail2.microsoft.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 21 Feb 2005 07:54:09 -0800 Received: from RED-MSG-32.redmond.corp.microsoft.com ([157.54.47.232]) by mailout1.microsoft.com with Microsoft SMTPSVC(6.0.3790.1289); Mon, 21 Feb 2005 07:54:08 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Mapping correctly a array type in a bean Date: Mon, 21 Feb 2005 07:51:40 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Mapping correctly a array type in a bean thread-index: AcUV0dlwIaGq2sUxRXyO39fE5gQ8xwCIWkdA From: "Dino Chiesa" To: , "Sebastien Mayemba Mbokoso" X-OriginalArrivalTime: 21 Feb 2005 15:54:08.0160 (UTC) FILETIME=[93C3BA00:01C5182D] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Is this documented? =20 -----Original Message----- From: Sebastien Mayemba Mbokoso [mailto:sebastien.mayemba@gmail.com]=20 Sent: Friday, February 18, 2005 10:52 AM To: axis-user@ws.apache.org Subject: Re: Mapping correctly a array type in a bean @Praveen Peddi=20 it's not a work around or another hack. No use any patch. I able to see also the childs. I am working on a project with DB and Hibernate Framework. In the DB there are 32 tables and so many relationships together. Before to find that mapping practice Axis couldn't see all the childs. Right now it can. And my web services run very well. So it's the right way for mapping an array in a bean. Look at the stubs generated by WSDL2Java. If you find a bean which begins by ArrayOf... it's means you don't map correctyl the an array. --------------- Sebastien On Fri, 18 Feb 2005 10:23:09 -0500, Praveen Peddi wrote: > Wow!. I did this and it fixed my problem. I didn't have to use the=20 > Eric's patch that I mentioned in another thread yesterday. I am able=20 > to see the child containers fine. Is this type of bean definition OK?=20 > I mean I just want to make sure its not a hack or anything. If this is > the right way to define array of objects in a bean, then I think this=20 > is the way to go for me. >=20 > Thanks Sebastien and all others. >=20 > Praveen > ----- Original Message ----- > From: "Sebastien Mayemba Mbokoso" > To: > Sent: Thursday, February 17, 2005 4:45 PM > Subject: Mapping correctly a array type in a bean >=20 > > Hi all, > > > > here is what i noticed today in work in Axis. This for sample the=20 > > beans i used : > > > > public class A { > > //some getters/setters > > } > > > > public class B { > > //some getters/setters > > A[] a; > > > > public A[] getA() { return this.a} > > public void setA(A[] a) { this.a =3D a} } > > > > When i use the Axis Ant Task for generating WSDL and after my=20 > > stubs, i noticed in the WSDL file that Axis can't map correctly the=20 > > array includes the bean of type B.Axis to guess itself the correct=20 > > type and generate something like that : > > ArrayOf_xsd ... That's > > wrong. So how can we have the correct type for avoiding that mistake. > > It's simple. We > > just have tp some 2 another getters in B like that : > > > > public class B { > > //some getters/setters > > A[] a; > > > > public A[] getA() { return this.a; } > > public void setA(A[] a) { this.a =3D a; } > > public A getA(int i) { return this.a[i]; } > > public void setA(int i, A anA) { this.a[i] =3D anA; } } > > > > Adding that 2 more getters offer us the possibility to obtain the=20 > > good type in the WSDL and the good generated beans. > > > > ------------- > > Sebastien > > >=20 >