honzasvasek
YaBB Newbies
Offline
Posts: 1
xmlrpc client return value. SOLVED
Jan 24th , 2008, 7:53pm
The xmlrcp library 'execute' function returns an Object. In my case this Object is a Vector. How in processing can one iterate through this Vector. This solution(from http://ws.apache.org/xmlrpc/faq.html ) Object[] result = (Vector)server.execute("Server.foo", param); for (int i = 0; i < result.length; i++) { ... } Or variants did not work because I missed importing java.util.Vector Here is my code: ---------------------------------------------------------- import xmlrpclib.*; import java.util.Vector; //<--- was missing XmlrpcClient isk; // connect to imageSeek server isk = new XmlrpcClient("http://localhost:31128/RPC"); isk.execute("saveDb", 1); int[] queryData = new int [] { 1, 1076257128, 81}; Object images = isk.execute("queryImgID", queryData); println(images); println(images.getClass()); ---------------------------------------------------------- output: [[1510057088, 100], [1114239248, 92.50212975257483], [1617276040, 89.30213380894818], [1428365052, 87.04448218334018]] class java.util.Vector I need the individual numbers, but cannot figure out how to get them in processing. Help :) I want to use processing as the display element of an artwork made out of motion (a linux security cam program) isk-daemon a webcam and a touch screen. currently I am using a webserver, php and firefox, but that is to slow. It is a feedbach system, where people see them self in a matrix of 'lookalikes'. see http://kansenzone.blogspot.com I have contacted the author of the xmlrcp lib, but have so far not received any response.