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
1
vote
1 answer

Non blocking Twisted xmlrpc

I want create xmlrpc with twisted in non blocking, but I don't know. I want call method in xmlrpc and I execute my method every time and from any client without wait. this is my code: from pymongo import MongoClient, ASCENDING, Connection,…
user255327
  • 47
  • 1
  • 6
1
vote
1 answer

Python XMLRPC: Handling arbitrary exceptions on client-side

I'm trying to pass arbitrary exceptions from a XMLRPC server to a client (both Python scripts, exception types are defined on both sides). There's an exemplary client-side implementation at ActiveState Recipes which parses the returned…
AndiDog
  • 68,631
  • 21
  • 159
  • 205
1
vote
1 answer

Make asynchronous xmlrpc (client call) in Tornado

I need to make asynchronous XML-RPC (client call) to a Cobbler server in Tornado, for example something like this: cobbler_connection = xmlrpclib.Server("http://my_cobbler_server") ... profile = yield gen.Task(cobbler_connection.get_profile,…
Joohwan
  • 2,374
  • 1
  • 19
  • 30
1
vote
0 answers

How to use metaWeblog.newPost (xmlrpc api) to schedule a new post?

I'm trying to create a new post on my site remotely using XMLRPC API and I'm using metaWeblog.newPost function as per codex: http://codex.wordpress.org/XML-RPC_MetaWeblog_API I have successfully created new posts into WordPress but when it comes to…
Irfan
  • 4,882
  • 12
  • 52
  • 62
1
vote
0 answers

xmlrpclib error when publishing to a Wordpress blog

some weeks ago I programmed a Python script which posted some content to a Wordpress blog, but since the past week it stopped working (I haven't changed anything) and now when I run the script I get this error: File "C:\Python27\lib\xmlrpclib.py",…
Guillem Cucurull
  • 1,681
  • 1
  • 22
  • 30
1
vote
0 answers

Consume a python RPC service in JAVA

Can I be able to consume Python RPC service in Java? Now I have a working prototype.. I wanted to get a list of all the available services in the server.. XmlRpcClient client = new XmlRpcClient(); XmlRpcClientConfigImpl config = new…
deeshank
  • 4,286
  • 4
  • 26
  • 32
1
vote
1 answer

How to specify the xmlrpc faultcode in the server code for python

The xmlrpclib of python is a convenient way to communicate to a different computer over the internet, providing direct access to classes, functions and more. In the case of an error on the server side, this error is reported to the client side as a…
Alex
  • 41,580
  • 88
  • 260
  • 469
1
vote
3 answers

Talking to supervisord over xmlrpc

I'm trying to talk to supervisor over xmlrpc. Based on supervisorctl (especially this line), I have the following, which seems like it should work, and indeed it works, in so far as it connects enough to receive an error from the server: #socketpath…
Marcin
  • 48,559
  • 18
  • 128
  • 201
1
vote
2 answers

Cancel xmlrpc client request?

Is it possible to somehow cancel xmlrpc client request? Let say that in one thread I have code like: svr = xmlrpclib.ServerProxy('http://localhost:9092') svr.DoSomethingWhichNeedTime() I don't mean some kind of TimeOut... Sometimes from another…
Adam
  • 2,254
  • 3
  • 24
  • 42
0
votes
1 answer

Wordpress XMLRPC(Redstone) permalink not working

I'm posting on Wordpress using the XMLRPC Api from Redstone. Although the post is made, the permalink is not set correctly. My code: XmlRpcClient client = new XmlRpcClient("xmlrpc link...", true); HashMap hmContent = new…
BigJ
  • 1,990
  • 2
  • 29
  • 47
0
votes
1 answer

Dynamic method name generation using xmlrpc

How using Python I can dynamically generate my call to my xmlrpc server using xmlrpc lib? something like def call_method(method_name) server = Server(self.URL, transport=ProxiedTransport()) server.method_name(params) The resolution takes…
Y G
  • 68
  • 1
  • 6
0
votes
1 answer

Using xmlrpclib with cookie obtained different way

How can I use xmlrpclib in Python script to connect to xmlrpc service that requires authentication, but without using xmlrpc authentication? To be specific: I use Drupal 7.8, there is of course service modules, I will use it's methods like…
wtk
  • 1,033
  • 10
  • 15
0
votes
0 answers

Unable to authenticate Odoo8 db wirh XMLRPC in Odoo14

I am trying this simple code and below error comes while getting uid url = 'http://localhost:8071' db = "db8aaa_19sep22" username = "admin" password = "Admin@347" common =…
M Tahir Noor
  • 443
  • 2
  • 10
  • 31
0
votes
2 answers

Python: Is it possible to set the clientport with xmlrpclib?

Is it possible to set the clientport for the xmlrpc-connection? I want to say: Client should make a ServerProxy-object to over a specific client port or pseudocode something like this: serv =…
0
votes
2 answers

xmlrpc newPaste - expected an object with the buffer interface

in py2 there was rv = xmlrpc.pastes.newPaste(language, code, None, filename, mimetype, private) I'm getting error : expected an object with the buffer interface Can't find any docs about xmlrpc and py3. I found only this snippet : p1 =…
cnd
  • 32,616
  • 62
  • 183
  • 313