At least until Generics comes to life in JDK 1.5... ----- Original Message ----- From: "Navneet Joneja" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 21, 2003 9:39 PM Subject: RE: newbie question : List vs. ArrayList vs. <specificClassType>[]
> Speaking as a webservices consumer and publisher, I prefer the the array > method. Since there's no language-neutral binding for List, I would assume > the WSDL would use the type as xsd:any or soapenc:Array, which would mean > the list could contain anything. Your consumers will probably not find that > easy to work with. > - Navneet > > > -----Original Message----- > From: Rumpa Giri [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 21, 2003 4:09 PM > To: '[EMAIL PROTECTED]' > Subject: newbie question : List vs. ArrayList vs. <specificClassType>[] > > > 1) public RegInfo[] getList1(RegInfo[] regInfos) { > return regInfos; > } > > 2) public ArrayList getList2(ArrayList infos){ > return infos; > } > > 3) public List getList3(List infos){ > return infos; > } > > Trying (1) was the easiest since the wsdl generated was proper in terms of > the type of parameters and output expected. > The generated soap request was easy using the wsdl for (1). In case of not > knowing how my clients generate the soap request, > is this the easiest approach? Since the wsdl is clear? > > Trying (2) how do you specify what type of objects constitute the array list > in the wsdl? > > Trying (3) Although this compiles fine, how do I tell which class to > instantiate? Where do I specify that in the wsdl? > I put the bean mapping in the wsdd, for List specifying the > languageSpecificType="java:java.util.List", Should it be > The concrete class that I am expecting? > > Thanks in advance, > Rumpa > > This transmission may be confidential or protected from disclosure and is > only for review and use by the intended recipient. Access by anyone else is > unauthorized. Any unauthorized reader is hereby notified that any review, > use, dissemination, disclosure or copying of this information, or any act or > omission taken in reliance on it, is prohibited and may be unlawful. If you > received this transmission in error, please notify the sender immediately. > Thank you. > > >