且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过同一连接进行多次XML-RPC调用?

更新时间:2023-02-06 20:42:37

Fumigator写道:
The Fumigator wrote:
嗨。

我希望能够在XML-RPC之间创建持久连接>客户端和服务器...即我想能够登录一次,携带
拨打多个电话,然后退出而不是发送登录信息
每次通话。
有没有办法使用标准库中的xml-rpc代码执行此操作?
Hi.

I want to be able to create a persistent connection between an XML-RPC
client and server... i.e. I want to be able to login once, carry
out a number of calls and then logout rather than send login info
every call.
Is there a way to do this with the xml-rpc code in the standard library?




不是我的knowlegde - 原因不是python,而是
的原始性
xmlrpc。它根本不允许关联连接状态。


我所做的是创建句柄并传递它们 - 至少限制

并对api用法进行规范化:


proxy = xmlrpclib.Server(''http:// localhost:7080 /'')

ak = proxy.authenticate(用户,密码)

print proxy.some_method(ak,argument)


如果你想要有状态连接,请使用更好的IPC标准,如CORBA - 它的

方式更先进。 SOAP最近引起了人们的注意,但是它作为xmlrpc受到类似的限制,而且与肥皂连接相关联的会话状态有时可能是b $ b,它不是标准化的......

-

问候,


Diez B. Roggisch



Not to my knowlegde - and the reason is not python, but the primitiveness of
xmlrpc. It simply doesn''t allow for connection state to be associated.

What I do is to create handles, and pass these around - that at least limits
and sort of normalizes the api usage:

proxy = xmlrpclib.Server(''http://localhost:7080/'')
ak = proxy.authenticate(user, password)
print proxy.some_method(ak, argument)

If you want stateful connection, use better IPC-standards, as CORBA - its
way more advanced. SOAP gets attention lately, but its similarily limited
as xmlrpc, and while session state associoated with soap connections is
possible sometimes, its not standarized....
--
Regards,

Diez B. Roggisch


The Fumigator写道:
The Fumigator wrote:
嗨。

我希望能够在XML-RPC
客户端和服务器之间创建持久连接...即我希望能够登录一次,携带
拨打多个电话,然后退出而不是每次通话都发送登录信息。

有没有办法做到这一点使用标准库中的xml-rpc代码?

提前致谢
Hi.

I want to be able to create a persistent connection between an XML-RPC
client and server... i.e. I want to be able to login once, carry
out a number of calls and then logout rather than send login info for
every call.

Is there a way to do this with the xml-rpc code in the standard library?

Thanks in advance




登录,退出是什么意思和登录信息?你的意思是建立

连接,关闭连接和<我不知道什么是等价的

登录信息>?你想要一个keepalive吗?如果是这样,我不知道

如何使用标准库。如果您在XMLRPCServer上有某种

登录机制,我会假设您必须将
传回任何密钥。你在每次通话时都收到了....但是我想b / b
猜它取决于你的意思。

Jeremy Jones



What do you mean by login, logout and login info? Do you mean establish
connection, close connection and <I don''t know what would be equivalent
for login info>? Are you wanting a keepalive? If so, I don''t know of
how to do that with the standard library. If you''ve got some sort of
login mechanism on your XMLRPCServer, I would assume you would have to
pass back whatever "key" you received upon login per call.... But I
guess it depends on what you mean.
Jeremy Jones


我希望能够在
XML-RPC客户端和服务器之间创建持久连接...即我希望能够登录一次,
进行多次通话,然后退出,而不是每次通话都发送登录信息。
有没有办法用标准
库中的xml-rpc代码执行此操作?
I want to be able to create a persistent connection between an
XML-RPC client and server... i.e. I want to be able to login once,
carry out a number of calls and then logout rather than send login
info for every call. Is there a way to do this with the xml-rpc code in the standard
library?




查看multicall xmlrpclib库的功能。它可以做你想要的




Skip



Look at the multicall capability of the xmlrpclib library. It may do what
you want.

Skip