Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-28 Thread Dieter Maurer
lucas wrote at 2021-3-27 18:53 +0100: >Following our previous discussion: > https://www.talkend.net/post/287193.html > >I finally took time (thanks to Florian R.) to get a reproducible example >of my problem, as asked previously by ChrisA. I compared `xmlrpc.client.ServerProxy.__init__` for Py

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-28 Thread Terry Reedy
On 3/27/2021 6:10 PM, lucas wrote: I hope it will solve it too. Do i need to do anything ? Review the patch by trying it out on your system. If necessary because you do not have a local cpython clone, backup installed 3.9 Lib/xmlrpc.py and hand-edit. Then report OS, python used, and result.

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-28 Thread Chris Angelico
On Sun, Mar 28, 2021 at 9:12 AM lucas wrote: > > Thank you ChrisA ! > > I hope it will solve it too. Do i need to do anything ? > > Thank you for your time and help. > There are a couple of things you can do actually! First off, here's the pull request, which will be where further comments happen

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-27 Thread Terry Reedy
On 3/27/2021 5:49 PM, Chris Angelico wrote: https://bugs.python.org/issue38038 It seems to have been intended as a pure refactor, so I'd call this a regression. Fortunately, it's not difficult to fix; but I'm not sure if there are any other subtle changes. The regression's already been reporte

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-27 Thread lucas
Thank you ChrisA ! I hope it will solve it too. Do i need to do anything ? Thank you for your time and help. Best wishes, --lucas On 27/03/2021 22:49, Chris Angelico wrote: On Sun, Mar 28, 2021 at 5:00 AM lucas wrote: I finally took time (thanks to Florian R.) to get a reproducible exampl

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-27 Thread Chris Angelico
On Sun, Mar 28, 2021 at 5:00 AM lucas wrote: > I finally took time (thanks to Florian R.) to get a reproducible example > of my problem, as asked previously by ChrisA. Thanks! With this in hand, I can play around with it. > On debian, Python 3.7, i got: > > 127.0.0.1 - - [27/Mar/2021 18:31:

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-27 Thread lucas
And, in my outputs, a key part is missing: the received arguments as parsed by Flask: Python 3.7: REQUEST: ImmutableMultiDict([('u', 'user'), ('p', 'password')]) Python 3.9: REQUEST: ImmutableMultiDict([]) Have a good day everyone, --lucas On 27/03/2021 18:53, lucas wrote: Followin

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-03-27 Thread lucas
Following our previous discussion: https://www.talkend.net/post/287193.html I finally took time (thanks to Florian R.) to get a reproducible example of my problem, as asked previously by ChrisA. The following code is implementing a webserver with Flask, and a client with the XMLRPC client

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 20:21, Chris Angelico wrote: On Thu, Feb 25, 2021 at 6:14 AM lucas wrote: I tested from the windows computer (Python 3.8, it appears, not 3.7 as i thought), and got the following nginx log: [LAPTOP IP] - - [24/Feb/2021:20:06:42 +0100] "POST /lib/exe/xmlrpc.php?u=[user]&p=[passwor

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 6:14 AM lucas wrote: > I tested from the windows computer (Python 3.8, it appears, not 3.7 as i > thought), and got the following nginx log: > > [LAPTOP IP] - - [24/Feb/2021:20:06:42 +0100] "POST > /lib/exe/xmlrpc.php?u=[user]&p=[password] HTTP/1.1" 200 209 "-" > "DokuWikiX

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 19:22, Chris Angelico wrote: On Thu, Feb 25, 2021 at 5:12 AM lucas wrote: On 24/02/2021 18:48, Chris Angelico wrote: I added socket.gethostbyname("wiki.example.net") (i removed the https:// since it, obviously now i think about it, led to a socket error) in the program, so i coul

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 5:12 AM lucas wrote: > > On 24/02/2021 18:48, Chris Angelico wrote: > I added socket.gethostbyname("wiki.example.net") (i removed the https:// > since it, obviously now i think about it, led to a socket error) > in the program, so i could verify both the URL and IP are equi

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 18:48, Chris Angelico wrote: On Thu, Feb 25, 2021 at 4:36 AM lucas wrote: A properly-formed URL will start with a protocol. I don't know specifically what changed, but it's looking like something started rejecting malformed URLs. Try adding "http://"; or "https://"; to your URL (w

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 4:36 AM lucas wrote: > > A properly-formed URL will start with a protocol. I don't know > > specifically what changed, but it's looking like something started > > rejecting malformed URLs. Try adding "http://"; or "https://"; to your > > URL (whichever is appropriate) and s

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 18:00, Chris Angelico wrote: On Thu, Feb 25, 2021 at 2:02 AM lucas wrote: Hi everyone, (Sorry for the double-send if any, i'm not sure the first send was performed, maybe because of bounce errors according to mailman.) I'm currently trying to understand an error when using the

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 2:02 AM lucas wrote: > > Hi everyone, > > (Sorry for the double-send if any, i'm not sure the first send was > performed, maybe because of bounce errors according to mailman.) > > > I'm currently trying to understand an error when using the > dokuwikixmlrpc python module, a

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
Hi, thanks for your answer ! I updated everything, including certificates, while upgrading to python 3.9, and retried today (no new certificates to install). I am the administrator of the wiki i try to access, and didn't do black magic in the configuration.. The error really seems to came fr

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread 2QdxY4RzWzUUiLuE
On 2021-02-24 at 15:29:58 +0100, lucas wrote: > I'm currently trying to understand an error when using the dokuwikixmlrpc > python module, allowing to easily work with DokuWiki RPC interface. > > Another description of the problem : > https://github.com/kynan/dokuwikixmlrpc/issues/8 > > H

RE: xml-rpc server on wine

2011-11-08 Thread Prasad, Ramit
>> Hi, I have a XML-RPC server python running on VM Windows (on Linux) >> and a XML-RPC client python on Linux. Server and client have different >> IP address. I'd like migrate server on wine. How can communicate >> server and client? IP address is different or is the same? >> Can you help me? >No

Re: xml-rpc server on wine

2011-11-07 Thread Adam Tauno Williams
On Sat, 2011-11-05 at 05:50 -0700, pacopyc wrote: > Hi, I have a XML-RPC server python running on VM Windows (on Linux) > and a XML-RPC client python on Linux. Server and client have different > IP address. I'd like migrate server on wine. How can communicate > server and client? IP address is diff

Re: xml-rpc

2010-03-29 Thread Brian Quinlan
On Mar 14, 2010, at 12:14 AM, ahmet erdinc yilmaz wrote: Hello, Recenetly we are developing a senior project and decide to use xmlrpclib. However I have some questions. In the documentation I could not find any clue about handling requests? Does the server handles each request in a separ

Re: xml-rpc

2010-03-16 Thread Gabriel Genellina
En Sun, 14 Mar 2010 05:14:49 -0300, ahmet erdinc yilmaz escribió: Recenetly we are developing a senior project and decide to use xmlrpclib. However I have some questions. In the documentation I could not find any clue about handling requests? Does the server handles each request in a separa

Re: xml-rpc

2010-03-14 Thread Martin P. Hellwig
On 03/14/10 10:32, hackingKK wrote: Instead of using the library directly, isn't python-twisted a better choice? Why? -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: xml-rpc

2010-03-14 Thread hackingKK
Instead of using the library directly, isn't python-twisted a better choice? happy hacking. Krishnakant. On Sunday 14 March 2010 03:47 PM, Martin P. Hellwig wrote: On 03/14/10 08:14, ahmet erdinc yilmaz wrote: Hello, Recenetly we are developing a senior project and decide to use xmlrpclib.

Re: xml-rpc

2010-03-14 Thread Martin P. Hellwig
On 03/14/10 08:14, ahmet erdinc yilmaz wrote: Hello, Recenetly we are developing a senior project and decide to use xmlrpclib. However I have some questions. In the documentation I could not find any clue about handling requests? Does the server handles each request in a separate thread? Or is t

Re: XML-RPC(using SimpleXMLRPCServer) slow on the first call

2009-10-14 Thread Mahi Haile
-- Forwarded message -- > From: "Gabriel Genellina" > To: python-list@python.org > Date: Wed, 14 Oct 2009 00:52:13 -0300 > Subject: Re: XML-RPC(using SimpleXMLRPCServer) slow on the first call > En Mon, 12 Oct 2009 18:58:45 -0300, Mahi Haile > escrib

Re: XML-RPC(using SimpleXMLRPCServer) slow on the first call

2009-10-13 Thread Gabriel Genellina
En Mon, 12 Oct 2009 18:58:45 -0300, Mahi Haile escribió: Hello all,I have an xml-rpc server running on a machine in the same LAN as the client. Both the server and the client are in Python. When I have a series of xmlrepc calls from the client to the server, the first call usually takes mu

Re: XML-RPC

2008-10-26 Thread Stefan Behnel
asit wrote: > what is XML-RPC System Doesn't Wikipedia tell you that? Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: XML RPC Problem....

2008-09-13 Thread Usman Ajmal
Yeah right but i don't see something wrong in my server's code. Following is my server's simple code import SimpleXMLRPCServer #server = ServerProxy("http://betty.userland.com";) class AuthenticationFunctions: def s(self): print "something..." server = SimpleXMLRPCServer.SimpleXM

Re: XML RPC Problem....

2008-09-13 Thread Fredrik Lundh
Usman Ajmal wrote: Problem is that when i start client (while the server is already running), i get an error i.e. Error 500 Internal Server Error that's a server error, not a client error. check the server logs (e.g. error.log or similar). -- http://mail.python.org/mailman/listinfo/pyth

Re: XML RPC Problem....

2008-09-13 Thread Usman Ajmal
Problem is that when i start client (while the server is already running), i get an error i.e. Error 500 Internal Server Error On Sat, Sep 13, 2008 at 3:58 PM, Fredrik Lundh <[EMAIL PROTECTED]>wrote: > Usman Ajmal wrote: > > Where exactly should i call ServerProxy? Following is the code from my

Re: XML RPC Problem....

2008-09-13 Thread Fredrik Lundh
Usman Ajmal wrote: Where exactly should i call ServerProxy? Following is the code from my client.py ServerProxy is the preferred name. Server is an old alias for the same class. t = SecureTransport() t.set_authorization(ustring, text_ucert) server = xmlrpclib.Server('http://l

Re: XML RPC Problem....

2008-09-13 Thread Usman Ajmal
Where exactly should i call ServerProxy? Following is the code from my client.py t = SecureTransport() t.set_authorization(ustring, text_ucert) server = xmlrpclib.Server('http://localhost:8000/',transport=t) print server.s() Note: Full code for client is here at http://privatepast

Re: XML RPC Problem....

2008-09-13 Thread Fredrik Lundh
Usman Ajmal wrote: Please explain the arguments of send_request. What exactly are the connection, handler and request_body? It will be really helpful if you give an example of how do i call send_request you don't call send_request. you should pass the SecureTransport instance as an argument

Re: XML RPC Problem....

2008-09-13 Thread Usman Ajmal
Please explain the arguments of send_request. What exactly are the connection, handler and request_body? It will be really helpful if you give an example of how do i call send_request On Thu, Sep 11, 2008 at 7:18 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote: > Usman Ajmal wrote: > > And i also fou

Re: XML-RPC "filter"

2008-09-12 Thread luigi . paioro
On 11 Set, 18:45, Richard Levasseur <[EMAIL PROTECTED]> wrote: > Because he wants to insert parameters at the very start, he can > probably get away with modifying the xml directly.  Just find the > position of the (i think thats the tag) and insert the xml > you need after it.  Its pretty dirty,

Re: XML-RPC "filter"

2008-09-11 Thread Richard Levasseur
On Sep 10, 2:04 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > On 9 Set, 17:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> I would go for a slightly different approach: make your server have a > >> dispatch-method that delegates the calls to the und

Re: XML RPC Problem....

2008-09-11 Thread Usman Ajmal
Thanks for ur help. But now i am getting an error xmlrpclib.ProtocolError: Here is my code at http://privatepaste.com/d81Kut9AFj Any idea what wrong am i doing? On Thu, Sep 11, 2008 at 7:18 AM, Fredrik Lundh <[EMAIL PROTECTED]>wrote: > Usman Ajmal wrote: > > And i also fount that a typical

Re: XML RPC Problem....

2008-09-11 Thread Fredrik Lundh
Usman Ajmal wrote: And i also fount that a typical system.auth call will look like: POST /xmlrpc/clarens_server.py HTTP/1.0 Host: localhost User-Agent: xmlrpclib.py/0.9.9 (by www.pythonware.com ) Content-Type: text/xml Content-Length: 105 AUTHORIZATION: Basic MkhVTm

Re: XML-RPC "filter"

2008-09-10 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: On 9 Set, 17:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: I would go for a slightly different approach: make your server have a dispatch-method that delegates the calls to the underlying actual implementation. But *before* that happens, extract the information as

Re: XML-RPC "filter"

2008-09-10 Thread Richard Levasseur
On Sep 9, 8:53 am, Luigi <[EMAIL PROTECTED]> wrote: > Dear all, > > I'm writing an XML-RPC server which should be able to modify the > incoming request before dispatching it. In particular I wand to added > two fixed parameters to the method called: one is the client host > address, and the other i

Re: XML-RPC "filter"

2008-09-10 Thread luigi . paioro
On 9 Set, 17:55, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > I would go for a slightly different approach: make your server have a > dispatch-method that delegates the calls to the underlying actual > implementation. But *before* that happens, extract the information as > above, and either > >

Re: XML-RPC "filter"

2008-09-09 Thread Diez B. Roggisch
Luigi wrote: > Dear all, > > I'm writing an XML-RPC server which should be able to modify the > incoming request before dispatching it. In particular I wand to added > two fixed parameters to the method called: one is the client host > address, and the other is the user name provided as for Basic

Re: xml-rpc timeout

2007-09-24 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Steve > Holden wrote: > >> Timeouts shouldn't be a normal feature of TCP communications. > > On the contrary, they should. How else are you going to detect that the > other side has died? You missed the point, which is that TCP hosts s

Re: xml-rpc timeout

2007-09-22 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Steve Holden wrote: > Timeouts shouldn't be a normal feature of TCP communications. On the contrary, they should. How else are you going to detect that the other side has died? -- http://mail.python.org/mailman/listinfo/python-list

Re: xml-rpc timeout

2007-09-21 Thread Steve Holden
Jd wrote: > Steve Holden wrote: >> Jd wrote: >>> Hi >>>I have a multi-threaded application. For certain operations to the >>> server, I would like to explicitly set timeout so that I get correct >>> status from the call and not timed out exception. >>>Does anyone know how to go about doing

Re: xml-rpc timeout

2007-09-21 Thread Jd
Steve Holden wrote: > Jd wrote: >> Hi >>I have a multi-threaded application. For certain operations to the >> server, I would like to explicitly set timeout so that I get correct >> status from the call and not timed out exception. >>Does anyone know how to go about doing it ? >> > The easi

Re: xml-rpc timeout

2007-09-21 Thread Steve Holden
Jd wrote: > Hi >I have a multi-threaded application. For certain operations to the > server, I would like to explicitly set timeout so that I get correct > status from the call and not timed out exception. >Does anyone know how to go about doing it ? > The easiest way is to use socket.setd

Re: XML-RPC SSL and client side certs?

2007-04-11 Thread Martin v. Löwis
Jeff McNeil schrieb: > I apologize for not giving you a Python specific answer, but for the > XMLRPC services I've deployed, I front them with Apache and proxy back > to localhost:8080. > > I do all of the encryption and authentication from within the Apache > proper and rely on mod_proxy to forwa

Re: XML-RPC SSL and client side certs?

2007-04-10 Thread Jeff McNeil
I apologize for not giving you a Python specific answer, but for the XMLRPC services I've deployed, I front them with Apache and proxy back to localhost:8080. I do all of the encryption and authentication from within the Apache proper and rely on mod_proxy to forward validated requests on. I've s

Re: XML-RPC + SimpleHTTPServer question

2006-07-07 Thread jbrewer
Thank you very much, Fredrik. Your code and suggestion worked perfectly. I haven't benchmarked the plain HTTP post vs Binary wrapper, but strangely even using the naive Binary wrapper in Python sends files much faster than how Java + Axis wraps byte arrays in SOAP messages. Jeremy -- http://ma

Re: XML-RPC server-client communication

2006-07-06 Thread Stefka
no, its an extern IP adress. For my needs the server and the client must be on different machines. But I opened the port and it worked. Thanks anyway :) Greetz, Stefka Marco Aschwanden wrote: > > server = SimpleXMLRPCServer.SimpleXMLRPCServer(("xxx.xxx.xxx.xxx", > > 22999)) > > Could it be that x

Re: XML-RPC + SimpleHTTPServer question

2006-07-06 Thread Tal Einat
I have recently implemented a system where clients connect to an RPC server (RPyC in my case), run a webserver on the RPC server, and close the webserver when they're done with it. To do this I wrote a ServerThread class which wraps a SimpleHTTPServer, runs as a thread, and can be signalled to sto

Re: XML-RPC server-client communication

2006-07-06 Thread Marco Aschwanden
> server = SimpleXMLRPCServer.SimpleXMLRPCServer(("xxx.xxx.xxx.xxx", > 22999)) Could it be that xxx.xxx.xxx.xxx stands for '127.0.0.1'? If so... rename it to 'localhost'. If you bind a port to 127.0.0.1 it will be found only on the same machine. Greetings, Marco -- http://mail.python.org/mai

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
OK, I posted my previous message before I saw your reply on how to handle the server side. On the client side, should I use httplib.HTTPConnection.request() to upload the data or can I do this through xmlrpc.ServerProxy objects? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
Fredrik Lundh wrote: > the XML-RPC protocol uses HTTP POST, so if you can handle XML-RPC, you > should be able to handle any POST request. what server are you using ? I need some clarification of your suggestion. Instead of sending URLs, I could read the file as a string, create a Binary object

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: > Just SimpleXMLRPCServer from the standard library. which means that you should be able to do something like from SimpleXMLRPCServer import SimpleXMLRPCServer,\ SimpleXMLRPCRequestHandler class MyRequestHandler(SimpleXMLRPCRequestHandler): def do_POST(self):

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
>What server are you using? Just SimpleXMLRPCServer from the standard library. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: > Sorry for such a simple question, but how would I do this? XML-RPC > runs on top of HTTP, so can I do a POST without running a separate HTTP > server? the XML-RPC protocol uses HTTP POST, so if you can handle XML-RPC, you should be able to handle any POST request. what server

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread jbrewer
Fredrik Lundh wrote: >why not just use an ordinary HTTP POST request ? Sorry for such a simple question, but how would I do this? XML-RPC runs on top of HTTP, so can I do a POST without running a separate HTTP server? Jeremy -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC server-client communication

2006-07-05 Thread Stefka
Hi, thanx for the hint :)! I ran a port scan and it turned out, that the port was realy closed. Thanx again! greetz, Stefka Laszlo Nagy wrote: > Please go to the machine where you php program resides, and check if the > server is not blocked by firewall rules. For example, do > > telnet xxx.xxx

Re: XML-RPC + SimpleHTTPServer question

2006-07-05 Thread Fredrik Lundh
jbrewer wrote: > I'm currently implementing an XML-RPC service in Python where binary > data is sent to the server via URLs. However, some clients that need > to access the server may not have access to a web server, and I need to > find a solution. I came up with the idea of embedding a simple

Re: XML-RPC server-client communication

2006-07-05 Thread Laszlo Nagy
Stefka írta: > Hi all, > > I try to implement a python xml-rpc server and call it from a php > client. If the server and the client are on the same machine > (localhost) the communication between them is just fine. When I start > the server on a different host I don't get an answer. > Please go

Re: xml-rpc and 64-bit ints?

2006-05-02 Thread Martin v. Löwis
Mark Harrison wrote: > I've got an API that deals with 64 bit int values. Is there > any way of handling this smoothly? Right now I'm casting > the values into and out of strings for the API. In XML-RPC, everything is transmitted as a string, so I don't think that choice is really that bad - exc

Re: XML-RPC server via xinetd

2006-04-17 Thread Jean-Paul Calderone
On Mon, 17 Apr 2006 14:17:51 +0200, Jos Vos <[EMAIL PROTECTED]> wrote: >On Mon, Apr 17, 2006 at 12:42:00PM +0200, Fredrik Lundh wrote: > >> except that if the OP's expecting the other end to use an ordinary XML-RPC >> library, he needs to implement some minimal HTTP handling as well. > >Which makes

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 12:42:00PM +0200, Fredrik Lundh wrote: > except that if the OP's expecting the other end to use an ordinary XML-RPC > library, he needs to implement some minimal HTTP handling as well. Which makes me wondering why the classes (this also applies to BaseHTTPServer / BaseHTTP

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 12:36:18PM +0200, Brian Quinlan wrote: > I don't know exactly what your usage pattern is, but you might be able > to use SimpleXMLRPCDispatcher directly e.g. > > >>> s = SimpleXMLRPCDispatcher() > >>> s.register_function(pow) > >>> s._marshaled_dispatch(' ' --X/OS

Re: XML-RPC server via xinetd

2006-04-17 Thread Fredrik Lundh
Nick Craig-Wood wrote: > Look at /usr/lib/python2.4/SimpleXMLRPCServer.py (adjust as per your > distro) and in particular the definition of the CGIXMLRPCRequestHandler class. > > That looks as thought it almost, or maybe completely, does what you > want, ie an XMLRPC subclass which reads from stdi

Re: XML-RPC server via xinetd

2006-04-17 Thread Brian Quinlan
Jos Vos wrote: > On Mon, Apr 17, 2006 at 03:30:04AM -0500, Nick Craig-Wood wrote: > >> UTSL ;-) >> >> Look at /usr/lib/python2.4/SimpleXMLRPCServer.py (adjust as per your >> distro) and in particular the definition of the CGIXMLRPCRequestHandler >> class. > > I did this before posting my questio

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 03:30:04AM -0500, Nick Craig-Wood wrote: > UTSL ;-) > > Look at /usr/lib/python2.4/SimpleXMLRPCServer.py (adjust as per your > distro) and in particular the definition of the CGIXMLRPCRequestHandler class. I did this before posting my question, in fact, but I did not look

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 12:10:15PM +0200, Brian Quinlan wrote: > If you take a look at CGIXMLRPCRequestHandler > (http://docs.python.org/lib/node564.html), you will see an example of > how to write an XMLRPCRequestHandler without HTTP. Thanks, this might work for me, will try it. -- --Jos

Re: XML-RPC server via xinetd

2006-04-17 Thread Brian Quinlan
Jos Vos wrote: > The problem is that I do not see how to let an SimpleXMLRPCServer > instance *not* bind to a port or what other class I can use to just > build a XML-RPC request handler reading/writing from stdin/stdout, > i.s.o. carrying all the server class stuff with it. I think that the prob

Re: XML-RPC server via xinetd

2006-04-17 Thread Jos Vos
On Mon, Apr 17, 2006 at 02:07:37AM +0200, Martin P. Hellwig wrote: > If I understood it correctly you want the python server bind be > depending on whatever is configured in xinetd.conf and not be defined in > the your program itself? > > I tested a bit around with my FreeBSD machine but indeed

Re: XML-RPC server via xinetd

2006-04-17 Thread Nick Craig-Wood
Jos Vos <[EMAIL PROTECTED]> wrote: > I'm trying to figure out how to implement a XML-RPC server that > is called by xinetd i.s.o. listening on a TCP socket itself. > > I already have implemented a stand-alone XML-RPC server using > SimpleXMLRPCServer, but I now want something similar, that is

Re: XML-RPC server via xinetd

2006-04-16 Thread Martin P. Hellwig
Jos Vos wrote: > > The problem is that the server initialization *requires* a server > address (host, port pair), but I don't see how to tell it to use > the stdin socket (and I'm afraid this is not possible, but I'm not > sure). > If I understood it correctly you want the python server bind be

Re: XML-RPC server via xinetd

2006-04-16 Thread Jos Vos
On Sun, Apr 16, 2006 at 10:13:19PM +0200, Martin P. Hellwig wrote: > Isn't this just a standard daemon functionality? What is "a standard daemon"? :-) > So if you could wrap up your program in a daemon like fashion (e.g. > http://homepage.hispeed.ch/py430/python/daemon.py) and then point the >

Re: XML-RPC server via xinetd

2006-04-16 Thread Martin P. Hellwig
Jos Vos wrote: > Hi, > > I'm trying to figure out how to implement a XML-RPC server that > is called by xinetd i.s.o. listening on a TCP socket itself. > > I already have implemented a stand-alone XML-RPC server using > SimpleXMLRPCServer, but I now want something similar, that is > started via x

Re: xml-rpc - adodb - None type - DateTime type

2005-10-28 Thread infidel
> I can replace all None values with the string 'Null', there's no > problem, but I can't detect the DateTime type object I retrieve from > the database. > > I have something like this: > def xmlrpc_function(): > conn = adodb.NewADOConnection('postgres') > conn.Connect(host,user,password,da

Re: XML-RPC -- send file

2005-04-20 Thread Skip Montanaro
codecraig> stefan: i added, "return 1" to my sendFile method on the server...took codecraig> care of the error, thanks. Yes, by default XML-RPC doesn't support objects like Python's None. As the error message indicated you have to enable allow_none to permit transmission of None. Skip

Re: XML-RPC -- send file

2005-04-19 Thread codecraig
stefan: i added, "return 1" to my sendFile method on the server...took care of the error, thanks. f. petitjean: i cleaned up my code by closing the file, however, when i tried your exact code above...i got stuck an infinite loop and my PC speaker beeped over and over :) thanks. -- http://mail.

Re: XML-RPC -- send file

2005-04-19 Thread F. Petitjean
Le 19 Apr 2005 11:02:47 -0700, codecraig a écrit : > Experient I have been :) > > Here is what I am getting now > > CLIENT > --- > d = xmlrpclib.Binary(open("C:\\somefile.exe").read()) open the file with mode "rb" fin = open(r'C:\somefile.exe', 'rb') contents = fin.read() fin.close()

Re: XML-RPC -- send file

2005-04-19 Thread Stefan Behnel
codecraig schrieb: CLIENT --- d = xmlrpclib.Binary(open("C:\\somefile.exe").read()) server.sendFile(d) SERVER -- def sendFile(tmp): print "FILE:", tmp This returns None. Don't know what XML-RPC expects, but you may either try to return something else from the function or ma

Re: XML-RPC -- send file

2005-04-19 Thread codecraig
Experient I have been :) Here is what I am getting now CLIENT --- d = xmlrpclib.Binary(open("C:\\somefile.exe").read()) server.sendFile(d) SERVER -- def sendFile(tmp): print "FILE:", tmp The server receives the file, because it prints it out, but on the client I get

Re: XML-RPC -- send file

2005-04-19 Thread Skip Montanaro
codecraig> how would I decode it? Assuming you have Python at the other end and you get a Binary object instead of a string, access its data attribute. OTOH, xmlrpclib may automatically decode the wrapper object for you. In any case, I have two further recommendations: * Check the xmlr

Re: XML-RPC -- send file

2005-04-19 Thread codecraig
how would I decode it? -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC -- send file

2005-04-19 Thread Skip Montanaro
codecraig> I thought i read somewhere that by using pickle or something, codecraig> that u could get a string representation of your object (or a codecraig> file in my case) and send that. Any ideas? Sure: stuff = xmlrpclib.Binary(open(somefile).read()) server.call_some_remo

Re: XML/RPC server with SSL in Python

2005-03-22 Thread news
Gerson Kurz wrote: > Are there any alternatives to using M2Crypto for an XML/RPC server in > SSL in Python? tlslite supports SocketServers like SimpleXMLRPCServer: http://trevp.net/tlslite Trevor -- http://mail.python.org/mailman/listinfo/python-list

Re: XML/RPC server with SSL in Python

2005-03-22 Thread Paul Rubin
[EMAIL PROTECTED] (Gerson Kurz) writes: > Are there any alternatives to using M2Crypto for an XML/RPC server in > SSL in Python? stunnel? (www.stunnel.org) -- http://mail.python.org/mailman/listinfo/python-list