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

SimpleXMLRPCServer calling Celery tasks

I'm trying to make a simple RPC server with SimpleXMLRPCServer and Celery. Basically, the idea is that a remote client (client.py) can call tasks via xmlrpc.client to the server (server.py) which includes functions registered as Celery tasks…
0
votes
1 answer

Cuckoo xmlrpclib missing while uploading file

I recently set up Cuckoo environment on Arch Linux host with WXPSP3 guest. When I try to upload file for analysis using submit.py I get the following error: Traceback (most recent call last): File "./utils/submit.py", line 23, in from…
wendigu
  • 1
  • 3
0
votes
2 answers

Does XML-RPC in general allows to call few functions at once?

Can I ask for few question in one post to XML-RPC server? If yes, how can I do it in python and xmlrpclib? I'm using XML-RPC server on slow connection, so I would like to call few functions at once, because each call costs me 700ms.
0
votes
1 answer

Fault: No Attribute in xmlrpclib.py

I'm working on an application in which a server and client are being created; the ServerAPI is using SimpleXMLRPCServer and the ClientAPI is using xmlrpclib. The client is initiated with: class w_Client: def __init__(self, ServerIP,…
0
votes
0 answers

Insert an image to wordpress post

How can I insert an image from url to wordpress? I use the code below to insert a post. I don't want to just attach thumbnail. def write_post_to_wordpress(summary,title, keywords, category): date_now=str(datetime.datetime.today())[:-10] …
Abhishek Bhatia
  • 9,404
  • 26
  • 87
  • 142
0
votes
1 answer

python wordpress xmlrpc. How to pass variable to wp.call

its all about wordpress_xmlrpc for python lets start with code: wp1 = Client('http://example.com/xmlrpc.php', 'username1', 'pass1') wp2 = Client('http://example.com/xmlrpc.php', 'username2', 'pass2') this works fine when I try to add new…
Krystian
  • 31
  • 3
0
votes
1 answer

Python xmlrpclib parameters passing

I want to pass some data using Python RPC. I got the result correctly but also got an error. xmlrpclib.Fault: :invalid literal for float(): 127.0.0.1">. I did not change anything just got the error suddenly. It looks like the parameter issue…
user2263305
  • 97
  • 1
  • 2
  • 7
0
votes
1 answer

Library for openERP connection with android device

I'm trying to connect with openERP with the library that openERP or odoo uses with their examples. But the Apache library of xmlrpc, I can't find it. Here is the documentation that openERP gives but they use the apache library :…
Theo Jansen
  • 81
  • 1
  • 4
  • 11
0
votes
0 answers

Python XMLRPC and https

I'm using Python 2.7.9 on Mac os x yosemite. I'm using the following module to post updates to our Magento install via their API. Github Magento Python XMLRPC It works fine using a normal HTTP connection to my test server, however, when I try to…
Alex Hellier
  • 435
  • 1
  • 7
  • 15
0
votes
2 answers

Python (PostgreSQL) wrap local and remote calls in one transaction

I am doing synchronization between two databases in Odoo. If it goes without any issues on remote, then it synchronizes on both sides. But if something goes wrong on remote, then local database changes are committed, but remote is not. In other…
Andrius
  • 19,658
  • 37
  • 143
  • 243
0
votes
3 answers

NoClassDefFoundError: org.apache.xmlrpc.client.XmlRpcClient

I've started developing with XML-RPC in Android but since I've added the JAR files I keep getting this error when I click on my button: java.lang.NoClassDefFoundError: org.apache.xmlrpc.client.XmlRpcClient I always get it when I click on the button…
Yenthe
  • 2,313
  • 5
  • 26
  • 46
0
votes
1 answer

How to set UTF-8 encoding with XMLRPC client library

I'm using XMLRPC client to call Adestra API services. Currently I'm having problems inserting Bosnian letters č, ć, ž, đ, š. I configured my XMLRPC client to work with UTF-8, but still having problems. Here my code sample: //******* LOGIN…
MrD
  • 2,423
  • 3
  • 33
  • 57
0
votes
1 answer

Autocompletion of function parameters in (I)Python for XMLRPC-Client

I am using xmlrpclib to interactively remote control some lab equipment with IPython. I love IPython's autocompletion features and I would also like to have it via xmlrpclib. So far I managed to accomplish method name completion and method help with…
Dietrich
  • 5,241
  • 3
  • 24
  • 36
0
votes
1 answer

How can I binary read a file in TCL and send it via XMLRPC to a server that is written in Python?

I have an XMLRPC server written in Python (using xmlrpclib) that has the following method defined: def saveFileOnServer(fileName, xmldata): handle = open(fileName, "wb") handle.write(xmldata.data) handle.close() return 0 If I'm…
Radu Enea
  • 27
  • 7
0
votes
1 answer

How to find out xmlrpc interface of any webservice?

How to find out xmlrpc interface of any webservice? For example in case of SOAP webservices you can just have a look at WSDL and findout the interface. In particular I am looking for interface of xmlrpc implemented using xmlrpclib in python. I have…
user41451
  • 269
  • 1
  • 4
  • 12
1 2 3
9
10