如何在C#中使用XMLRPC

我需要从我的C#应用​​程序进行XMLRPC调用,但我没有找到任何帮助。 当我使用Ruby的XMLRPC时,它很简单:

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

是否有类似的C#库?

使用xml-rpc.net库非常简单,这是您需要做的:

 [XmlRpcUrl("http://url_to_your_server/api.php")] public interface ISumAndDiff : IXmlRpcProxy { [XmlRpcMethod("your.remote.procedure")] string testMyClient(string test); } ISumAndDiff proxy = XmlRpcProxyGen.Create(); string ret = proxy.testMyClient("test"); 

看看这个库是否适合你
https://code.google.com/p/xmlrpcnet/