tags:

views:

2605

answers:

2

Hi,

I need to make XMLRPC calls from my C# application and I failed to find any help with that. When I used XMLRPC from Ruby, it's that simple:

server = XMLRPC::Client.new2("http://server/api.php")
result = server.call("remote.procedure", [1, [['crit1', 'crit2', 'crit3']]])

is there any similar library for C#? Thanks!

+7  A: 

See if this library works for you
http://www.xml-rpc.net/

Joel Martinez
+2  A: 

Thanks Joel.

Ok, so I figured out how to use the xml-rpc.net library, it's very simple, here is what you need to do:

[XmlRpcUrl("http://url_to_your_server/api.php")]

public interface ISumAndDiff : IXmlRpcProxy
{
    [XmlRpcMethod("your.remote.procedure")]
    string testMyClient(string test);
}

ISumAndDiff proxy = XmlRpcProxyGen.Create<ISumAndDiff>();

string ret = proxy.testMyClient("test");