You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by "Meehan, Bradley" <Br...@CommerceBank.com> on 2002/09/09 17:40:52 UTC
Returning Arrays
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
Re: Returning Arrays
Posted by John Wilson <tu...@wilson.co.uk>.
Meehan, Bradley wrote:
[snip]
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
Bradly,
you are not using the Apache XML-RPC. The kxmlrpc product is part of the
Enhydra project (http://kxmlrpc.enhydra.org/). This may be a problem with
their implementation. You would probably be better off asking your question
on one of thier mailing lists.
John Wilson
The Wilson Partnership
http://www.wilson.co.uk
Re: Returning Arrays
Posted by John Wilson <tu...@wilson.co.uk>.
Meehan, Bradley wrote:
[snip]
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
Bradly,
you are not using the Apache XML-RPC. The kxmlrpc product is part of the
Enhydra project (http://kxmlrpc.enhydra.org/). This may be a problem with
their implementation. You would probably be better off asking your question
on one of thier mailing lists.
John Wilson
The Wilson Partnership
http://www.wilson.co.uk