Hi ,
Do we have an example of how to connect XML RPC with c#.
Hi ,
Do we have an example of how to connect XML RPC with c#.
using System;
using CookComputing.XmlRpc;
namespace OpenNebulaTest
{
class Program
{
static void Main(string[] args)
{
ISystem proxy = XmlRpcProxyGen.Create();
string user = “userid”;
string password = “Password”;
string session = user + “:” + password;
Array ret = proxy.Version(session);
Array userPool = proxy.UserPoolInfo(session);
}
}
[XmlRpcUrl("http://youropennebulaIP:2633/RPC2")] //normally port is 2633 unless configured differently
public interface ISystem : IXmlRpcProxy
{
[XmlRpcMethod("one.system.version")]
Array Version(string session);
[XmlRpcMethod("one.userpool.info")]
Array UserPoolInfo(string session);
}
}