You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Chris Aiken <ai...@gmx.de> on 2004/04/29 15:25:53 UTC
The result of a vector is null - except the last element
If the following service is generated by j2wsdl and wsdl2j:
/* The Service */
public class MigrationServiceSoapBindingImpl implements Migration {
public A getA() throws RemoteException {
return new A();
}
}
/* Class to return */
public class A implements java.io.Serializable {
private java.util.Vector vec;
public A() {
vec = new java.util.Vector();
addSomeBToVec();
}
public void addSomeBToVec() {
vec.add(new B());
vec.add(new B());
vec.add(new B());
vec.add(new B());
}
public java.util.Vector getVector() {
return vec;
}
}
/* Class that should be added to a vector */
public class B implements java.io.Serializable {
String str = "b";
public B(){}
public String getString() {
return b;
}
}
... then I get as result of "getA().getVector().getString()":
b
null
null
null
However, the result should be:
b
b
b
b
This bug is already known, but does any solution exist for it?
I tried Axis 1.1 and 1.2beta.
Thanks in advance!!!
Chris
public B(){
}
}
____________
Virus checked by G DATA AntiVirusKit
Version: AVK 14.0.620 from 29.03.2004
Virus news: www.antiviruslab.com