Questions tagged [xmlrpclib]

xmlrpclib is the Python standard library module for transparently handling XML Remote Procedure Call. (Available since v2.2)

xmlrpclib is the Python standard library module for handling XML Remote Procedure Call. It has been available since Python 2.2, and is capable of sending the following types of data:

  • Booleans
  • Numbers
  • Strings
  • Arrays
  • Dicts
  • Dates
  • Binary data

The library's main class, ServerProxy, transparently calls its methods across a network, without having to use any special syntax. For example,

proxy = xmlrpclib.ServerProxy("http://www.example.com/rpc-example")
x = proxy.stdev([1,2,3,4,5])

will, behind the scenes, do this:

  1. Transmit a call to the stdev method (along with arguments, changed into XML RPC format) across the network, to the XML RPC server at "http://www.example.com/rpc-example".

  2. The server will read the command respond with the results of the call.

  3. The proxy object will read the results.

  4. The results will be cast from XML RPC format into a native Python object, and returned.

The Python documentation site hosts the xmlrpclib documentation.

149 questions
0
votes
1 answer

Unable to use custom Transport class with python xmlrpclib due to TypeError: unbound method request()

I am trying to use a custom Transport class with xmlrpclib in Python but when I specify a custom Transport, I do get an exception at the first call: File "/Users/sorins/dev/py/confluence/confluence/confluence.py", line 208, in __init__ …
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
1 answer

Please help porting xmlrpc java syntax to python

I'm trying to workout how to use org.apache.xmlrpc.client.XmlRpcClient in python. I'm using code in https://github.com/mcasperson/vaultdemo/blob/master/src/main/java/com/redhat/ecs/App.java : final XmlRpcClientConfigImpl config = new…
Tomas D
  • 103
  • 2
  • 10
0
votes
0 answers

Xml-RPC Server Python - Multicall requests?

Let's assume that my code looks like that: from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler # Restrict to a particular path. class RequestHandler(SimpleXMLRPCRequestHandler): rpc_paths…
Thomas
  • 503
  • 1
  • 12
  • 18
0
votes
0 answers

What could cause xmlrpclib.ServerProxy to send headers only?

I am using Python 2.6.4 built-in xmlrpclib.ServerProxy. On the server side, and every now and then, the server will only get the headers of the request. I've worked around it by using transport that buffers the whole request before sending it, but I…
alejandro
  • 1,234
  • 1
  • 9
  • 19
0
votes
1 answer

XMLRPC call error

I'm having problem during XMLRPC call. The code is following: $msg = new xmlrpcmsg( "contact.search", array( //Set user id new xmlrpcval($tableID, "int"), new xmlrpcval( array( "email"=> new…
MrD
  • 2,423
  • 3
  • 33
  • 57
0
votes
1 answer

Wordpress post status published with xmlrpc lib

I'm trying to publish posts via xmlrpc lib with Python. The problem is in post status: it setted to "publish in future" but should to be "published". Here is a part of my code: status_draft = 0 status_published = 1 server =…
Valery Statichny
  • 593
  • 7
  • 22
0
votes
1 answer

Figure out the point (latest sent byte) after TCP disconnection

I am wondering if it is possible to figure out the last byte that a server has sent to a client using TCP connection. To put it in details, I have a client and a server, both in C++. They are communicating using XMLRPC and the connection is TCP. The…
Mohammad Khodaei
  • 501
  • 1
  • 4
  • 15
0
votes
1 answer

Is there a way to use a python encoding so xmlrpc fault messages are shown on the client side with correct CR?

On the server side of a xmlrpc server in python I have the following line of code within a function overwriting SimpleXMLRPCServer._marshaled_dispatch: response = xmlrpclib.dumps( xmlrpclib.Fault(1, "some error\nnext line\n"), …
Alex
  • 41,580
  • 88
  • 260
  • 469
0
votes
1 answer

Python script to interface with RHN Satellite's API

I am trying to create a python script that interfaces with RHN Satellite's API. The code below schedules a remote command to be run instantly against the specified server( var id). The problem is that the Satellite server schedules the command…
0
votes
2 answers

What are the pieces of a xmlrpc call

Let's have a simple xmlrpc server defined as in the following code: from SimpleXMLRPCServer import SimpleXMLRPCServer def add(x,y): return x+y server = SimpleXMLRPCServer(("localhost", 8000)) server.register_function(add,…
Alex
  • 41,580
  • 88
  • 260
  • 469
0
votes
1 answer

sys.maxint and xmlrpclib.MAXINT

I guess there is a reason for xmlrpclib to have a seperate MAXINT than sys. Can anyone explain to me why? >>> print xmlrpclib.MAXINT 2147483647 >>> print sys.maxint 2147483647
MattyW
  • 1,519
  • 3
  • 16
  • 33
0
votes
1 answer

Improving speed of xmlrpclib

I'm working with a device that is essentially a black box, and the only known communication method for it is XML-RPC. It works for most needs, except for when I need to execute two commands very quickly after each other. Due to the overhead and…
r36363
  • 589
  • 4
  • 15
-1
votes
1 answer

Joeblogs Wordpress exception 401

I am developing C# Windows application that uses joeblogs WordPress api to post to WordPress blogs via this application. I have tested sample program with localhost url as localhost/wordpress/xmlrpc.php, it worked fine and posted successfully but…
Raj
  • 13
  • 1
  • 5
-2
votes
2 answers

Call the Python interactive interpreter from within a Python script

Is there any way to start up the Python interpreter from within a script , in a manner similar to just using python -i so that the objects/namespace, etc. from the current script are retained? The reason for not using python -i is that the script…
mmirate
  • 704
  • 6
  • 25
1 2 3
9
10