]
David Boeren updated JBXB-79:
-----------------------------
Attachment: coils.ZIP
Example Eclipse project demonstrating the error
Array parameter is being appended rather than passed intact
-----------------------------------------------------------
Key: JBXB-79
URL:
http://jira.jboss.com/jira/browse/JBXB-79
Project: JBoss XML Binding (JBossXB)
Issue Type: Bug
Reporter: David Boeren
Attachments: coils.ZIP
When I call a webservice method and pass an object containing an array of another object
type, the server receives the array with additional elements. The array elements that I
pass are appended, so that if I send 1 element the server receives 81. If I send 80
elements, the server receives 160. There are always 80 element preceding the first one
that I pass.
The value 80 comes from code in the object constructor that preinitializes the array to
this size.
This form causes the bug:
public class Coils implements Serializable{
private int numberOfCoils;
private CoilData[] array = new CoilData[80];
}
This form likewise causes the bug:
public class Coils implements Serializable{
private int numberOfCoils;
private CoilData[] array;
public Coils() {
array = new CoilData[80];
}
}
This form does not cause the bug:
public class Coils implements Serializable{
private int numberOfCoils;
private CoilData[] array;
public Coils() {
}
}
Coils coils = new Coils();
coils.setArray(new CoilData[80]);
So, it has something to do with initializing it in the construction of the object.
Attached is a full Eclipse project exhibiting the bug that you can run on JBoss 4.0.4.GA
with JBossWS.
To keep the attachment size down, I left off the library files. You will need:
activation.jar, jbossall-client.jar, jbossws-client.jar, mail.jar, xercesImpl.jar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: