Hi. I just stumbled upon XML-RPC and have a question: I am having trouble
returning a Vector in my J2ME Midlet using XML-RPC . I can return a
Hashtable fine, but not a Vector. I get the Exception below.
Is this correct? Any tips?
try{
XmlRpcClient xmlrpc = new XmlRpcClient( URL);
Vector params = new Vector();
System.out.println( "MID: Calling VMIS..." );
Vector results = (Vector) xmlrpc.execute( "vmis.getNames" , params );
System.out.println( "MID:" + results );
}
(getNames returns a Vector of Strings.)
<methodCall>
<methodName>vmis.getNames</methodName>
</methodCall>
org.kxml.io.ParseException: unexpected: StartTag <data> line: -1 attr: null
@-1:-1 at org.kxml.parser.AbstractXmlParser.read(+53) at
org.kxmlrpc.XmlRpcParser.parseValue(+15) at
org.kxmlrpc.XmlRpcParser.parseArray(+23) at
org.kxmlrpc.XmlRpcParser.parseValue(+241) at
org.kxmlrpc.XmlRpcParser.parseParams(+46) at
org.kxmlrpc.XmlRpcParser.parseResponse(+144) at
org.kxmlrpc.XmlRpcClient.execute(+200) at Veloxita.<init>(+45) at
java.lang.Class.runCustomCode(+0) at
com.sun.midp.midlet.Selector.commandAction(+50) at
javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+152) at
com.sun.kvem.midp.lcdui.EmulEventHandler$EventLoop.run(+459) MID:null
Thanks,
Bradley C. Meehan