On 14 avr. 08, at 15:24, FabrÃcio J. Barth wrote:
> Dear all,
>
> I'm trying the method client.execute("confluence1.getPages", params)
> with xmlrpc-client-3.1 for retrieve all the pages of one Space.
>
> The information in the Confluence documentation is that the getPages
> method returns a Vector. But, when I use the
> client.execute("confluence1.getPages", params) it returned an Object.
>
> I can't castings the Object to Vector. I tried with xmlrpc-client-3.0
> too.
>XmlRpcClient.execute always returns an Object. It's your responsibility, then, to cast it to the correct type, depending on the API you are using. The current getPages implementation returns an Object[] so as Asiri correctly said, typecast it to (Object[]) and things will work fine. Maybe the confusion comes from the Confluence documentation where they mention the type "Vector". Actually XMLRPC doesn't support Vectors as a data type (http://ws.apache.org/xmlrpc/types.html ) and when you serialize arrays or Lists, they are always deserialized as Object[] (you can check it yourself by doing a simple System.out.format("%s\n", client.execute(...).getClass()); So whenever you read Vector, think of it as Object[] :) Cheers, Fabio _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

