[one-users] RPCXML response problem

Giuseppe Carella cargius at gmail.com
Mon May 2 02:57:12 PDT 2011


Hi all,

I have a problem with XMLRPC API using it with JAVA.
When I send a request to opennebula XMLRPC server, I receive
a response like this:

[Ljava.lang.Object;@19968e23

How can I extract the vid from this response object?

I have followed all the instructions in the java example of the web site.

public class XmlRpcTest {
    public static void main( String
<http://www.google.com/search?hl=en&q=allinurl%3Astring+java.sun.com&btnI=I%27m%20Feeling%20Lucky>
args[] ) throws Exception
<http://www.google.com/search?hl=en&q=allinurl%3Aexception+java.sun.com&btnI=I%27m%20Feeling%20Lucky>
{
        XmlRpcClient client = new XmlRpcClient( "http://localhost:2633/RPC2" );
        Vector <http://www.google.com/search?hl=en&q=allinurl%3Avector+java.sun.com&btnI=I%27m%20Feeling%20Lucky>
params = new Vector
<http://www.google.com/search?hl=en&q=allinurl%3Avector+java.sun.com&btnI=I%27m%20Feeling%20Lucky>();
        params.addElement("SESSION-GOLA&4H910");
        params.addElement("MEMORY=345 CPU=4
DISK=[FILE=\"img\",TYPE=cd]""DISK=[FILE=\"../f\"]");

        Object <http://www.google.com/search?hl=en&q=allinurl%3Aobject+java.sun.com&btnI=I%27m%20Feeling%20Lucky>
result = client.execute( "one.vm.allocate", params );

        if ( result != null )
            System
<http://www.google.com/search?hl=en&q=allinurl%3Asystem+java.sun.com&btnI=I%27m%20Feeling%20Lucky>.out.println(
result.toString() );
    }}


Your help is kindly appreciated!

thanks,

Giuseppe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110502/36c343db/attachment-0002.htm>


More information about the Users mailing list