来自Python/P的XMLRPC和Continuum

2024-03-29 10:27:17 发布

您现在位置:Python中文网/ 问答频道 /正文

有人成功地使用Python或Perl通过xmlrpc获取数据吗。。。?在

我用的是连续体.py图书馆:

#!/usr/bin/env python

from continuum import *

c = Continuum( "http://localhost:8080/continuum/xmlrpc" )

或者:

^{pr2}$

给出:No such handler: system.listMethods

有人表现更好吗。。。?在


Tags: nofrompyimportenvlocalhosthttpbin
2条回答

您所描述的不是客户端库的一部分,而是服务器是否实现这些方法的问题。在

我是RPC::XMLPerl模块的作者,在我提供的服务器类中,我还提供了基本“自省”API的实现,该API已成为XML-RPC领域的一种半标准。但即使这样,服务器类的用户也可能选择不激活内省API。在

当然,我不能谈论其他XML-RPC实现。在

是的。。。使用Perl。在

我用过XML::RPC。事实上,我编写了CPAN模块WWW::FreshMeat::API,使用它来访问freshmeatsXML-rpcapi,所以我知道它工作得很好!在

在Freshmeat中使用XML::RPC,“system.*”调用了我的工作。。。。在

use XML::RPC;
use Data::Dumper;

my $fm = XML::RPC->new( 'http://freshmeat.net/xmlrpc/' );

# need to put in your Freshmeat username/password here
my $session = $fm->call( 'login', { username => 'user', password => 'pass' });

my $x = $fm->call('system.listMethods');

say Dumper( $x );

给我。。。。在

^{pr2}$

希望有帮助。在

相关问题 更多 >