Multiple XML-RPC calls over the same connection?
Diez B. Roggisch
deetsNOSPAM at web.de
Fri Oct 29 06:18:20 EDT 2004
The Fumigator wrote:
> 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?
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
More information about the Python-list
mailing list