[one-users] Fwd: Xmlrpc Lib

hd nguyen nguyenhd2107 at gmail.com
Thu Dec 17 10:26:41 PST 2009


---------- Forwarded message ----------
From: hd nguyen <nguyenhd2107 at gmail.com>
Date: Fri, Dec 18, 2009 at 1:25 AM
Subject: Fwd: [one-users] Xmlrpc Lib
To: user at lists.opennebula.org


Thanks for your reply,
But the main problem here is when I execute the command "vm.allocate" (which
will created a virtual machine description or VMTemplate - if I understand
correctly as API
http://opennebula.org/doku.php?id=documentation:rel1.4:api)<http://opennebula.org/doku.php?id=documentation:rel1.4:api%29>
,
But after this command, I use "onevm list" on ONE installed PC, no
VMTemplate found????
I don't know why is that!?
Regards,
DuyNH


On Fri, Dec 18, 2009 at 12:47 AM, hd nguyen <nguyenhd2107 at gmail.com> wrote:

>
>
> ---------- Forwarded message ----------
> From: Nikola Milutinovic <n.milutinovic at levi9.com>
> Date: Thu, Dec 17, 2009 at 4:39 PM
> Subject: Re: [one-users] Xmlrpc Lib
> To: hd nguyen <nguyenhd2107 at gmail.com>
>
>
>  hd nguyen wrote:
>
>
> Hi all,
> I have a test Program to test XmlRpc API in Open Nebula as bellow:
> *XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
>             config.setServerURL(new URL("http://192.168.1.41:2633/RPC2"));
>             XmlRpcClient client = new XmlRpcClient();
>             client.setConfig(config);
>
> Vector params = new Vector();
>
> params.addElement("oneadmint:7c4a8d09ca3762af61e59520943dc26494f8941b");
>             params.addElement(4);
>
>             Object result = client.execute( "one.host.info", params );
>
>                 System.out.println(result.getClass().getName());
>
>             if ( result != null )
>                 System.out.println( result.toString() );*
>
> Here is the printed result:
> *[Ljava.lang.Obj
> ect;@97a560*
>
>
> And that result is correct. The return type of the execute method is
> "Object[]", so that is what you should actually cast to.
>
> Object[] results = (Object[]) client.execute("one.host.info", parms);
> if (!((Boolean) results[0])) {
>      throw new OneException(results[1].toString());
> }
> return (results.length > 1) ? results[1] : null;
>
> Nix.
> --
>  Met vriendelijke groet / Kind regards,
> Nikola Milutinovic
> Sr Java Developer
> Levi9 Global Sourcing
>  ------------------------------
> .  Jan van Goyenkade 8, 1075 HP Amsterdam, The Netherlands
> (    +31 (0) 20 7547900 ext 2056
> (    +381 (0) 21 4895800 ext 2056
> È    +381 (0) 64 2202824
> *    n.milutinovic at Levi9.com
> ^    Skype: nikola.milutinovic
> ü    www.levi9.com
>
> Chamber of commerce Levi9 Global Sourcing BV: 34221951
> Chamber of commerce Levi9 Global Sourcing Benelux BV: 34224746
>  ------------------------------
>  This e-mail may contain confidential or privileged information. If you are
> not (one of) the intended recipient(s), please notify the sender immediately
> by reply e-mail and delete this message and any attachments permanently
> without retaining a copy. Any review, disclosure, copying, distribution or
> taking any action in reliance on the contents of this e-mail by persons or
> entities other than the intended recipient(s) is strictly prohibited and may
> be unlawful.
>
> The services of Levi9 are exclusively subject to its general terms and
> conditions. These general terms and conditions can be found on
> www.levi9.com and a copy will be promptly submitted to you on your request
> and free of charge.
>
>
>
> --
> "The love makes the life better"
>



-- 
"The love makes the life better"



-- 
"The love makes the life better"



-- 
"The love makes the life better"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20091218/7cc80e52/attachment-0002.htm>


More information about the Users mailing list