Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-129

typecast errors when arrays are returned

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: Source
    • Labels:
      None
    • Environment:
      linux, java 1.4.2

      Description

      Java throws a ClassCastException when an array return value is cast to a typed array, for XML-RPC functions that return arrays.

      For example, the function

      public Integer[] foo(Integer[] val)

      { return val; }

      will work fine with the following client code:

      Integer[] param = new Integer[5];
      Object[] result = (Object[])server.execute("Server.foo", param);

      But the following will throw a class cast exception

      Integer[] param = new Integer[5];
      Integer[] result = (Integer[])server.execute("Server.foo", param);

      This error was first documented on the mailing list in this thread:
      http://mail-archives.apache.org/mod_mbox/ws-xmlrpc-dev/200609.mbox/%3c19c34bd10609220214g170174e2mdb9082f1aacb0537@mail.gmail.com%3e

      The response to the email suggests that this should be easy to fix.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kaminw kamin

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment