Questions tagged [simplexmlrpcserver]

The SimpleXMLRPCServer module provides a basic server framework for XML-RPC servers written in Python. Servers can either be free standing, using SimpleXMLRPCServer, or embedded in a CGI environment, using CGIXMLRPCRequestHandler.

This simple server example exposes a single function that takes the name of a directory and returns the contents. The first step is to create the SimpleXMLRPCServer instance and tell it where to listen for incoming requests (‘localhost’ port 9000 in this case)

class SimpleXMLRPCServer.SimpleXMLRPCServer(addr[, requestHandler[, logRequests[, allow_none[, encoding[, bind_and_activate]]]]) Create a new server instance. This class provides methods for registration of functions that can be called by the XML-RPC protocol. The requestHandler parameter should be a factory for request handler instances; it defaults to SimpleXMLRPCRequestHandler. The addr and requestHandler parameters are passed to the SocketServer.TCPServer constructor. If logRequests is true (the default), requests will be logged; setting this parameter to false will turn off logging. The allow_none and encoding parameters are passed on to xmlrpclib and control the XML-RPC responses that will be returned from the server. The bind_and_activate parameter controls whether server_bind() and server_activate() are called immediately by the constructor; it defaults to true. Setting it to false allows code to manipulate the allow_reuse_address class variable before the address is bound.

https://docs.python.org/2/library/simplexmlrpcserver.html

79 questions
2
votes
1 answer

Python SimpleXMLRPCServer: get user IP and simple authentication

I am trying to make a very simple XML RPC Server with Python that provides basic authentication + ability to obtain the connected user's IP. Let's take the example provided in http://docs.python.org/library/xmlrpclib.html : import xmlrpclib from…
1
vote
0 answers

How to get Class Variable Value from Python XML RPC Server

Hello I'm new to stackoverflow and to XMLRPC Server in Python: I have a class with the following parameters and i registered the class as a instance in xmlrpc server: The Class: class PacificPowerActiveLoad(PacificPowerLowerLevel): """Main…
Yijian
  • 11
  • 2
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
1 answer

XMLRPC c# client to python client - method does not exists

I've searched the web and seen the following question: XML-RPC C# and Python RPC Server I'm trying for a while to do the same, but I fail. I get the exception "Method "HelloWorld" is not…
Guy L
  • 2,824
  • 2
  • 27
  • 37
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

How to change the value of a variable at run time from another script at remote machine?

I have a local computer A and remote computer B. Computer A has script client.py Computer B has server.py Script client.py has a variable port. Let's say port = 5535. I am running client.py on Computer A, which is using the port number for socket…
1
vote
1 answer

Why can't xmlrpc client append item to list accessable via xmlrpc server procedure?

Server code (based on Python library reference): from xmlrpc.server import SimpleXMLRPCServer from xmlrpc.server import SimpleXMLRPCRequestHandler class RequestHandler(SimpleXMLRPCRequestHandler): rpc_paths = () server =…
MikeRand
  • 4,788
  • 9
  • 41
  • 70
1
vote
3 answers

reading the first value using simplexml

I am using simplexml to read all the child nodes successfully. But how do I read the "NumCrds"? some Bank CAD 00 I have read it somewhere in the PHP manual but…
shantanuo
  • 31,689
  • 78
  • 245
  • 403
1
vote
1 answer

Create a SimpleHTTPServer to use the python code as API

Is there a way to make my python script served by a Simple HTTP server and call the script functions from the outside (in an other program) in a API philosophy? EDIT Ok, thanks to @upman's answer, I know that I can use SimpleXMLRPCServer for that,…
farhawa
  • 10,120
  • 16
  • 49
  • 91
1
vote
1 answer

Python input interfering with SimpleXMLRPCServer

I have a server along these lines: from SimpleXMLRPCServer import SimpleXMLRPCServer def ack(msg): return input("Allow? ").lower() in ['y', 'yes'] server = SimpleXMLRPCServer(("localhost", 8080)) server.register_function(ack,…
thechao
  • 367
  • 2
  • 13
1
vote
0 answers

How to extend SimpleXMLRPCServer so that child class registers some functions?

I am learning python just now and trying to make a simple XML-RPC server. The examples in Python documentation show this: from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler # Restrict to a…
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
1
vote
1 answer

Python SimpleXMLRPCServer return value

I just started using a XMLRPC server and clients to connect my raspberry pi to a computer. My server looks like this: from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler import numpy as…
schlenzmeister
  • 149
  • 1
  • 3
  • 12
1
vote
1 answer

yield or log from a remote function in python SimpleXMLRPCServer

I am trying to call a long (time-consuming) function through XMLRPC in Python. My server.py: import time import SocketServer import SimpleXMLRPCServer PORT = 19989 class MyXMLRPCServer(SocketServer.ThreadingMixIn,…
user1156980
  • 115
  • 2
1
vote
2 answers

SimpleXMLRPCServer, wxPython and Thread - Howto Stop?

Here is an example program that illustrates my problem. The program starts a wxPython application and starts a SimpleXMLRPCServer in a thread. This all works fine. My problem is that I can't shut down the SimpleXMLRPCServer thread because it is…
mgag
  • 919
  • 2
  • 8
  • 13
1
vote
1 answer

can SimpleXMLRPCServer listen on multiple addresses?

I have two IPs mapping to the machine, and I was wondering how I can have one python xmlrpc server listening on both IPs (same port), like you could do with Apache. Thank you,
BME
  • 53
  • 1
  • 3