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

Discussion in 'Python' started by fortepianissimo, Oct 23, 2006.

  1. 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!
     
    fortepianissimo, Oct 23, 2006
    #1
    1. Advertising

  2. 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/>

    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!
     
    fortepianissimo, Oct 23, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Etienne Posthumus
    Replies:
    1
    Views:
    1,121
    Roger Binns
    Apr 1, 2004
  2. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    424
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  3. tsjuan
    Replies:
    1
    Views:
    338
    Diez B. Roggisch
    Nov 27, 2006
  4. Gustavo Rahal
    Replies:
    0
    Views:
    754
    Gustavo Rahal
    Aug 12, 2008
  5. News123
    Replies:
    9
    Views:
    3,134
    vilas
    Feb 15, 2012
Loading...

Share This Page