title: How to get String array from returned XML-RPC object?
body: <p>I am using Apache java XML-RPC latest version.</p>
  
  <p>The code for sending the array in Server is the following:</p>
  
  <pre><code>LinkedList&lt;String&gt; messages = new LinkedList&lt;String&gt;();
  
  public String[] getMessages() {
      System.out.println("Sent messages");
      return messages.toArray(new String[messages.size()]);
  }
  </code></pre>
  
  <p>To receive in the client I have tried something like this:</p>
  
  <pre><code>String[] result = (String[]) client.execute("Message.getMessages", new Object[] {});
  </code></pre>
  
  <p>This should cast the Object that I receive to the right type (String[]). Unfortunately it doesn't and I get the following error: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;</p>
  
  <p>So I am wondering if anyone knows how to properly send and receive arrays in java XML-RPC?</p>