Let’s say I have a ClassA which contains some members of type String and 1 member of an array of ClassB which in turn contains just a String member. Something like this:
public class ClassB{
private String string1;
public ClassB(){
string1 = "value1";
}
}
public class ClassA{
private String string1;
private String string2;
private ClassB[] classB = null;
public ClassA(){
string1 = "value1";
string2 = "value2";
classB = new ClassB[2];
classB[0] = new ClassB();
classB[1] = new ClassB();
}
}
Now I define a member function in my end point class as follows:
//...
public ClassA getClassA(){
return new ClassA();
}
//...
This code is obviously useless and incomplete and probably even wrong as I wrote it out of my head, but it demonstrates my point.
When I run java2wsdl.sh on this class (or a similar construct) I get a .wsdl file but the array ClassB[] is ignored.
I understand that axis2 by default uses JAXB serialization and I tried to control the output using annotations but to no avail.
How can I change the behaviour so that ClassB[] is included in the .wsdl file?
A necessary (but maybe not sufficient) condition to make this work is to declare ClassB as static.