That's a good suggestion, I was thinking of the data flow from server to
client, but users are more likely to care about the client side where
the request originates. Also, receiving seems to be a bit trickier than
sending with the XML RPC library.
I'll move the App.java earlier into the page.
Jochen Wiedmann wrote:
Thanks for taking this work. As the essence is contained in the
App.java listing, I suggest moving this to the top and somehow
highlighting the crucial three or so lines of code.
On Mon, Jul 13, 2009 at 5:27 PM, Ken Tanaka<ken.tan...@noaa.gov> wrote:
Being new to XML RPC, I didn't see as many examples of code on the web as I
would have liked, especially using current libraries, and I found no
complete examples that were compiled with maven, so I put up my resulting
example in the Apache wiki
http://wiki.apache.org/ws/XmlRpcExampleStringArray
Maybe the more experienced programmers can take a look at it and make
suggestions or fix shortcomings directly (part of why I chose the wiki). The
page could then be a useful example if you ever want to help teach someone
XML RPC.
-Ken
Stanislav Miklik wrote:
Hi,
AFAIK, you are right, option A is the way how it works (see:
http://ws.apache.org/xmlrpc/faq.html#arrays)
My only advice, make small tooling, eg.
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;
}
With such method you can have option B.
Best regards
Stano
On Wed, Jul 8, 2009 at 23:37, Ken Tanaka <ken.tan...@noaa.gov> wrote:
I'm using an xmlrpc-client 3.1.2 application to talk to an xmlrpc-server
3.1.2 server and want to pass an array of strings. I figure people on
this
list must have done this before.
...