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
0 answers

Creating a new post on in wordpress via python and wordress_xmlrpc

I want use python and wordpress_xmlrpc to automate posting on my wordpress site. This is the code that i'm using: import json from wordpress_xmlrpc import Client, WordPressPost from wordpress_xmlrpc.methods.posts import NewPost, GetPosts wp =…
Druz
  • 85
  • 1
  • 11
1
vote
1 answer

Python Robot Remote Server : OverflowError: int exceeds XML-RPC limits

I have setup a Python Robot Remote server on a RHEL 7.9 machine using docker. I also have a client (i.e. Python Robot Framework on RHEL 8.4) with Robot keywords defined which calls the server however, when the server tries to send response to the…
1
vote
0 answers

No module named 'xmlrpclib'

I'm running a python program in Terminal using Python 3.8.2. After running it on a new device, installing requirements (pip3 install requirements.txt), and trying to run (python3 swift-runner.py), I got an error saying "No module named yolk" I…
John
  • 231
  • 2
  • 8
1
vote
1 answer

How to handle multiple connections Abyss Server in XMLRPC - C++

The scenario is the next one: I have a XMLRPC-C++ applcation, listening for connections on PORT=8081. It implements an Abyss Server, using the xmlrpc-c library as next: xmlrpc_c::serverAbyss myAbyssServer( myRegistry, //handler of methods …
Luchux
  • 63
  • 1
  • 4
1
vote
1 answer

Restoring an Odoo Database with Python3 and xmlrpc failing

I am writing a python script to backup and restore an Odoo database (copy, really). My code to make the backup is as follows: def download_db() : conn = ServerProxy(url + '/xmlrpc/db') print ('Dumping database...') with…
Liz Lowe
  • 13
  • 4
1
vote
0 answers

Multithreading - XMLRPC server registering class objects as individual threads in Python 2.7.12

From the server side, I have prepared a python script where the following tasks are performed. Task 1 => Acquiring data from the sensors Task 2 => Setting a certain register in the robot control unit to 1 or 0 depending upon the acquired data from…
1
vote
0 answers

odoo - web service login using SSL (xml-rpc)

I have Odoo 8 installed with Nginx https enabled, How can I connect to the web api securely?, the following code raise an error (Access denied), is this the right way to deal with https connection? How connect using python: url =…
Salim R
  • 343
  • 7
  • 16
1
vote
1 answer

How can i customize xmlrpc response and request in python

Here is my xmlrpc server python code.I want to change response. from SimpleXMLRPCServer import SimpleXMLRPCServer import logger import db_connect # Set up logging logger.Logger(name="rpc", address="rpc.log") server = SimpleXMLRPCServer(('0.0.0.0',…
sharif779
  • 174
  • 2
  • 10
1
vote
1 answer

Odoo 10 - XMLRPC - Use external XML identifier

I am creating a new record via XMLRPC. Specificaly, I want to populate the field team_id in crm.lead. I would like to populate that field using sales_team.salesteam_website_sales (i.e. the external XML ID) instead of the number 2 (i.e. the regular…
M.E.
  • 4,955
  • 4
  • 49
  • 128
1
vote
1 answer

update selection field using xml-rpc

i want to ask how can i change state on my odoo from 'confirmed' to 'In progress' using python i want code like this: models.execute_kw(db, uid, password, 'mrp.production', 'write', [[ids], {'state': "In Progress"}])
1
vote
1 answer

"read" Data with multiple IDs from OpenERP using java with apache xml-rpc

Hi I am currently writing a servlet using Apache XML-RPC connecting to OpenERP. There are not any good resources around, and the java examples are very minimalistic and far from complete on the OpenERP site. Has anyone a clue where I could find an…
mahatmanich
  • 10,791
  • 5
  • 63
  • 82
1
vote
0 answers

Python XMLRPC wordpress uploadfile

I'm try using xmlrpclib in python to do write script upload image to website. But image could not be opened. Here my code: import xmlrpclib import base64 wp_url = "http://localhost/~mrvu/wp461/xmlrpc.php" wp_username = "admin" …
Vu Tran
  • 11
  • 3
1
vote
1 answer

Call arbitrary methods on class like xmlrpclib.ServerProxy

I have a remote api accepting XMLs only that may be called like api = xmlrpclib.ServerProxy(IP) result = api.Execute({"Method": 'Method_name', "Params": [P1, P2], ... # technical values - authentication, etc …
1
vote
0 answers

No such method: getAuthToken

I am trying to write a script to authenticate with a MoinMoin Wiki that is not running on my machine. I am under the assumption that my approach is correct per the information found here (see section 3.11) on the official MoinMoin wiki page. My code…
Zeke Medley
  • 111
  • 7
1
vote
1 answer

Error while pinging Pingomatic (XMLRPC) using python

I'm trying to ping Pingomatic using python. I've written this: import xmlrpclib print "START" s = xmlrpclib.Server('http://rpc.pingomatic.com') reply = s.weblogUpdates.ping('Test','http://www.testblog.com') print "END" But when I run, i get: >>>…
Gabriel Bianconi
  • 1,179
  • 3
  • 19
  • 37