Hello,
I'm trying to build a console application under C#.NET using XML-RPC to connect to Moodle.
Right now this is what I have, but I'm obviously missing some things here:
[code]
using CookComputing.XmlRpc;
[XmlRpcUrl("http://subdomain.ourorganization.com/webservice/xmlrpc/server.php?wstoken=nicelongstringtoken")]
public interface IMoodleUserGetUsersById : IXmlRpcProxy
{
[XmlRpcMethod("moodle_user_get_users_by_id")]
System.Object moodle_user_get_user_by_id(int[] userIds);
}
namespace Moodle_test_api1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Testing XML-RPC Services for Moodle!");
IMoodleUserGetUsersById proxy = XmlRpcProxyGen.Create<IMoodleUserGetUsersById>();
int[] myUserIds = {11, 12};
System.Object myResults = proxy.moodle_user_get_user_by_id(myUserIds);
}
}
}
[/code]