Praveen It's just like the beans generated by Axis if you do a doc-oriented service where you define your complex types containing collections in a schema - pretty standard.
Arijit >-----Original Message----- >From: Praveen Peddi [mailto:[EMAIL PROTECTED] >Sent: 18 February 2005 15:23 >To: [EMAIL PROTECTED] >Subject: Re: Mapping correctly a array type in a bean > >Wow!. I did this and it fixed my problem. I didn't have to use >the Eric's patch that I mentioned in another thread yesterday. >I am able to see the child containers fine. Is this type of >bean definition OK? 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 is the way to go for me. > >Thanks Sebastien and all others. > >Praveen >----- Original Message ----- >From: "Sebastien Mayemba Mbokoso" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Thursday, February 17, 2005 4:45 PM >Subject: Mapping correctly a array type in a bean > > >> Hi all, >> >> here is what i noticed today in work in Axis. This for >sample the 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 = a} >> } >> >> When i use the Axis Ant Task for generating WSDL and after my stubs, >> i noticed in the >> WSDL file that Axis can't map correctly the array includes >the bean of >> type B.Axis to >> guess itself the correct 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 = a; } >> public A getA(int i) { return this.a[i]; } >> public void setA(int i, A anA) { this.a[i] = anA; } >> } >> >> Adding that 2 more getters offer us the possibility to >obtain the good >> type in the WSDL >> and the good generated beans. >> >> ------------- >> Sebastien >> > > >