Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > question about xmlrpc server: returning a list of lists to a Java client?

Reply
Thread Tools

question about xmlrpc server: returning a list of lists to a Java client?

 
 
fortepianissimo
Guest
Posts: n/a
 
      10-23-2006
I have a simple xmlrpc server/client written in Python, and the client
throws a list of lists to the server and gets back a list of lists.
This runs without a problem.

I then wrote a simple Java xmlrpc client and it calls the python
server. But I can't figure out what type to cast the result (of type
Object) to. The Java xmlrpc call is basically this:


Object result = client.execute("MyFunction", params);


And I tried to replace that line with

Vector result = (Vector) client.execute("MyFunction", params);

and

ArrayList result = (ArrayList) client.execute("MyFunction", params);

and both gave me java.lang.ClassCastException.

I'm really not a Java expert - anyone can give a hint or two?

(NOTE the java client/python server works well when the returning
result is of type string - so this rules out some other possible
problems)

Thanks a lot!

 
Reply With Quote
 
 
 
 
fortepianissimo
Guest
Posts: n/a
 
      10-23-2006

fortepianissimo wrote:
> I have a simple xmlrpc server/client written in Python, and the client
> throws a list of lists to the server and gets back a list of lists.
> This runs without a problem.
>
> I then wrote a simple Java xmlrpc client and it calls the python
> server. But I can't figure out what type to cast the result (of type
> Object) to. The Java xmlrpc call is basically this:
>
>
> Object result = client.execute("MyFunction", params);
>
>
> And I tried to replace that line with
>
> Vector result = (Vector) client.execute("MyFunction", params);
>
> and
>
> ArrayList result = (ArrayList) client.execute("MyFunction", params);
>
> and both gave me java.lang.ClassCastException.
>
> I'm really not a Java expert - anyone can give a hint or two?
>
> (NOTE the java client/python server works well when the returning
> result is of type string - so this rules out some other possible
> problems)
>
> Thanks a lot!


Ok I'll answer to myself: found this message

http://mail-archives.apache.org/mod_...ilson.co.uk%3E

Basically it's introduced by a bug in Apache XMLRPC 3.0a1
implementation.

Anyone knows any update on this please do post up (the message was
dated in March 2006) - appreciate it!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
returning index of minimum in a list of lists JJLaRocque@gmail.com Python 11 06-22-2006 12:44 PM
List of lists of lists of lists... =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==?= Python 5 05-15-2006 11:47 AM
returning none when it should be returning a list? randomtalk@gmail.com Python 11 05-02-2006 10:26 AM
Re: xmlrpc, httplib and SSL (HTTP 1.1 XMLRPC client) Etienne Posthumus Python 1 04-01-2004 05:13 PM
list.index() like...but returning lists (for avoiding '0' onmultiples hits) Srinath Avadhanula Python 7 12-23-2003 03:27 PM



Advertisments