Client code
java.util.ArrayList list= new java.util.ArrayList();
for (int i=0; i < random; i++) {
list.Add(new MyType());
}
// invoke webservice, sending the list
stub.method1((MyType[])list.toArray(new MyType[1]);
Server code
// webmethod
public MyResponse Method1(MyType[] list) {
...
}
Does this now work?
-----Original Message-----
From: Suzy Fynes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 8:52 AM
To: [email protected]
Subject: RE: Dynamic Lists in Web Services (java /axis)
That's my problem, is it possible to make a dynamic list where the
length isn't fixed before the service is deployed and allow the client
to add as many objects to the list then send the request
-----Original Message-----
From: James Black [mailto:[EMAIL PROTECTED]
Sent: 08 March 2005 13:43
To: [email protected]
Subject: Re: Dynamic Lists in Web Services (java /axis)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Suzy Fynes wrote:
| Well the server wont know until the client has entered the amount..
~ My point is that the server has to know in order to return it.
~ As was pointed out, to return it as an array is easy.
- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCLavtikQgpVn8xrARAhLOAJ0VapJsOfM4kGuXpBojtK9JHfOoZgCeJSLS
UhJv8LeegvmGcSV60hNTcn4=
=iPdz
-----END PGP SIGNATURE-----