@Praveen Peddi 

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
<[EMAIL PROTECTED]> wrote:
> 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
> >
> 
>

Reply via email to