Thank you. Some how I missed that link(my apologies...),but that was exactly what I needed. Thank you for the tip on the array return type handling.
Thanks, Alan -----Original Message----- From: Stanislav Miklik [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2008 1:41 PM To: xmlrpc-dev@ws.apache.org Subject: Re: Are there any examples of clients loading parameters for structs or arrays? Hi, to see which xml-rpc types are maped to which java objects in apache xml-rpc, see http://ws.apache.org/xmlrpc/types.html And with the array (as a return parameter) , there is small problem that you don't know exactly what is returned, also here you can see an example how to handle that in general way: public static List decodeList(Object element) { if (element == null) { return null; } if (element instanceof List) { return (List) element; } if (element.getClass().isArray()) { int length = Array.getLength(element); LinkedList result = new LinkedList(); for (int i = 0; i < length; i++) { result.add (Array.get(element, i)); } return result; } return null; } And the struct is java.util.Map. In this case it is easy. ;-) Regards Stano On Wed, Apr 2, 2008 at 6:37 PM, Alan May <[EMAIL PROTECTED]> wrote: > Hi, > > > > Sorry for the user question, but I didn't see a currently active user > list listed on the apache website. > > > > I've just started using the apache xmlrpc 3.1 libraries for a xml-rpc > client and the programming model does make it incredibly easy to program > against. > > > > I was just wandering if xml-rpc structs or array types were supported > and if so, are there any examples I might be able to reference in either > postings in the archive(searched but didn't find any) or unit tests, > included example code, wiki pages, etc. I didn't see any claims on the > main page claiming support for these two features, but if anyone has > made this work, I'd love to see any references or get any advice. > > > > I've been really impressed how fast it was to get clients working with > your API... thank you very much for your efforts. > > > > Regards, > > Alan May > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]