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