我需要从我的 C# 应用程序进行 XMLRPC 调用,但我没有找到任何帮助。当我使用 Ruby 中的 XMLRPC 时,就这么简单:
server = XMLRPC::Client.new2("http://server/api.php")
result = server.call("remote.procedure", [1, [['crit1', 'crit2', 'crit3']]])
有没有类似的 C# 库?
我需要从我的 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<ISumAndDiff>();
string ret = proxy.testMyClient("test");
看看这个库是否适合你
https://code.google.com/p/xmlrpcnet/