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

Process responses from xmlrpclib

I use my own class X, that has api attribute which is ServerProxy from xmlrpclib. It looks more or less like this: class X: def __init__(self): self.api = xmlrpclib(...) I call a lot of xmlrequests by self.api.something(), but I'd like…
Gricha
  • 1,044
  • 3
  • 11
  • 26
2
votes
2 answers

cannot marshal objects

I am trying save record from django (front-end) to openerp (back-end). I am using openerp webservice using xmlrpclib. It works well with normal string and number data, but when i tried to pass date field, it throws error. cannot marshal
Vimal Rughani
  • 234
  • 4
  • 14
2
votes
1 answer

XML-RPC ResponseError failures on some machines and not others

I have a very simple python script that connects to a MoinMoin wiki via XMLRPC (v2) and pulls some data. It all begins with a simple authentication: self._server = xmlrpclib.ServerProxy(self.url) self.token = self._server.getAuthToken(self.user,…
lorenzog
  • 3,483
  • 4
  • 29
  • 50
2
votes
1 answer

Run Python script importing xmlrpclib on Windows?

I have been using Linux to programm Python scripts, but now I have to make one of them work on Windows XP, and here I am a beginner. I have installed Python 3.4 in C:\Python34, and I have my Python script in E:\solidworks_xmlrpc. This script works…
forvas
  • 9,801
  • 7
  • 62
  • 158
2
votes
0 answers

XMLRPC (client/proxy) use behind a firewall - Python 2.7

I'm new to XMLRPC but I need to use it (xmlrpclib in Python 2.7) to communicate with a server (www.neos-server.org) which accepts xml files. I'm behind a firewall that severely restricts outgoing and incoming traffic, but I'm able to browse the web…
user2777139
  • 51
  • 1
  • 4
2
votes
1 answer

Moses v1.0 multi language ini file

I was working with mosesserver 0.91 and everything works fine but now there is version 1.0 and nothing is same as before. Here is my situation: I want to have multi language translation from arabic to english and from english to arabic. All data and…
Milan Kocic
  • 459
  • 6
  • 20
2
votes
2 answers

XML-RPC python client raising xml.parsers.expat.ExpatError exception

I'm trying to do a XMP-RPC using xmlrpclib python's lib, but i'm getting xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 1 Here is the dict with parameters: {'cliente_chave':…
bslima
  • 1,097
  • 2
  • 15
  • 17
2
votes
2 answers

supervisord stop/start all process but exclude X and Y processes

I'm trying to stop about 20 services running on a remote server managed by Supervisord in one XMLRPC call. However, I want to exclude certain processes from it, it would be great if I could do something along the lines…
user1741694
  • 237
  • 4
  • 13
2
votes
2 answers

Python. Tornado. Non-blocking xmlrpc client

Basically we can call xmlrpc handlers following way: import xmlrpclib s = xmlrpclib.ServerProxy('http://remote_host/rpc/') print s.system.listmethods() In tornado we can integrate it like this: import xmlrpclib import tornado.web s =…
Nikolay Fominyh
  • 8,946
  • 8
  • 66
  • 102
2
votes
1 answer

How can I add a thumbnail to a wordpress post using xmlrpclib Python library?

I'm trying to develope a Python's script which needs to post content to a wordpress blog, the problem is that I need to set an image as the thumbnail of the post and I don't have any idea of how to do it. This is an example of a code to post…
Guillem Cucurull
  • 1,681
  • 1
  • 22
  • 30
2
votes
1 answer

Spyne/RPClib - How to respond with ComplexModel?

I'm using SPYNE for the very first time and I'm a little bit confused of how to respond with my ComplexModel. #service.py class Status(ComplexModel): statusCode = Integer statusMsg = String class ResponseData(ComplexModel): status =…
Thomas Schwärzl
  • 9,518
  • 6
  • 43
  • 69
2
votes
1 answer

What datatype should be used here to Accept the response from the Server

I am making a request to the Magento Server using XMLRPC to get the details using multiCall() function. I have achieved success in calling the multiCall() function as it does not results to any Exception. I am using Objects to send data and when I…
Haresh Chaudhary
  • 4,390
  • 1
  • 34
  • 57
2
votes
1 answer

using getattr on a python xmlrpc proxy

This answer implies I can use getattr on an xmlrpc server proxy. However, in my case that doesn't seem to work. Am I missing a step in the definition of my server? My server code is this: import SimpleXMLRPCServer class Listener(object): def…
Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
1
vote
1 answer

QThreads and xmlrpc client

I'm trying to use xmlrpc client from many QThreads. To make sure that only one thread is using xmlrpc client I created lock with QMutex. My code: import sys import xmlrpclib import threading import time from SimpleXMLRPCServer import…
Adam
  • 2,254
  • 3
  • 24
  • 42
1
vote
1 answer

How to check if a folder exists by its complete path in Plone?

I use xmlrpclib, wsapi4plone to connect to plone: client = xmlrpclib.ServerProxy('http://user:password@blah.com/plone') is there a method to check if a folder on plone exists by its url? something like:…
BPm
  • 2,924
  • 11
  • 33
  • 51