xml-rpc

Use Python xmlrpclib with unix domain sockets?

邮差的信 提交于 2019-11-30 18:56:53
I'm trying to interact with supervisord , and I'd like to talk with it over a unix socket (it's a shared hosting environment). What I've tried so far is: import xmlrpclib server = xmlrpclib.ServerProxy('unix:///path/to/supervisor.sock/RPC2') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/xmlrpclib.py", line 1549, in __init__ raise IOError, "unsupported XML-RPC protocol" IOError: unsupported XML-RPC protocol /path/to/supervisor.sock definitely exists. URIs of the form 'unix:///path/to/supervisor.sock/RPC2' are used by supervisord , which is

Socket in use error when reusing sockets

廉价感情. 提交于 2019-11-30 14:23:44
问题 I am writing an XMLRPC client in c++ that is intended to talk to a python XMLRPC server. Unfortunately, at this time, the python XMLRPC server is only capable of fielding one request on a connection, then it shuts down, I discovered this thanks to mhawke's response to my previous query about a related subject Because of this, I have to create a new socket connection to my python server every time I want to make an XMLRPC request. This means the creation and deletion of a lot of sockets.

Weather web service for Europe? [closed]

穿精又带淫゛_ 提交于 2019-11-30 09:03:33
We are looking for a reliable "current weather" web service for Europe, with city resolution. We only need the current weather. Since it is for a commercial web site, we don't mind paying a reasonable fee for the service. What are our options? What service would you recommend or avoid based on previous experience? Note: SOAP Web Service, XML RPC, REST, all are fine. The US NOAA has coded METAR information available for cities worldwide. Given the ICAO airport code for the city in question (eg. EGLL for London) you can quickly get a METAR report. Weather Underground is a successful weather site

Python XMLRPC with concurrent requests

孤街醉人 提交于 2019-11-30 05:03:01
问题 I'm looking for a way to prevent multiple hosts from issuing simultaneous commands to a Python XMLRPC listener. The listener is responsible for running scripts to perform tasks on that system that would fail if multiple users tried to issue these commands at the same time. Is there a way I can block all incoming requests until the single instance has completed? 回答1: I think python SimpleXMLRPCServer module is what you want. I believe the default behavior of that model is blocking new requests

Use Python xmlrpclib with unix domain sockets?

大憨熊 提交于 2019-11-30 02:21:00
问题 I'm trying to interact with supervisord , and I'd like to talk with it over a unix socket (it's a shared hosting environment). What I've tried so far is: import xmlrpclib server = xmlrpclib.ServerProxy('unix:///path/to/supervisor.sock/RPC2') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/xmlrpclib.py", line 1549, in __init__ raise IOError, "unsupported XML-RPC protocol" IOError: unsupported XML-RPC protocol /path/to/supervisor.sock

OpenERP 的XML-RPC的轻度体验+many2many,one2many,many2one创建方式

白昼怎懂夜的黑 提交于 2019-11-29 18:01:16
每当夏秋之交,我们都有展会,展会完后,都有很多的新的潜在客户要添加,我们收了一大堆名片,想入openERP还是需要一定时间的,而且名片的图片导入没有什么简洁的方法,所以我就想写个script来进行导入这些名片以及相关的客户信息。 XML-RPC是一个远程过程调用(remote procedure call,RPC)的分布式计算协议,通过XML将调用函数封装,并使用HTTP协议作为传送机制。 需求是这样的,想通过一个script来将一个excel表格的partner连同他们的联系人一起导入 # -*- encoding: utf-8 -*- import xmlrpclib import xlrd import base64 DB = ´TESTDB´#帐套名 USERNAME = ´admin´#用户名 USERPASS = ´1´#密码 IMAGELOCATION=´E:\IMG´ #图片的根目录地址 #读取excel文件 fname = &quot;E:TEST.xls&quot; #excel表格地址 bk = xlrd.open_workbook(fname) #按名字取sheet sh = bk.sheet_by_name(&quot;JOSHUA&quot;) #登陆取uid sock_common = xmlrpclib.ServerProxy (´http:/

OpenERP 的XML-RPC的轻度体验+many2many,one2many,many2one创建方式

两盒软妹~` 提交于 2019-11-29 18:00:59
来自: http://cn.openerp.cn/openerp_import_image_by_xmlrpc/ 每当夏秋之交,我们都有展会,展会完后,都有很多的新的潜在客户要添加,我们收了一大堆名片,想入openERP还是需要一定时间的,而且名片的图片导入没有什么简洁的方法,所以我就想写个script来进行导入这些名片以及相关的客户信息。 需求是这样的,想通过一个script来将一个excel表格的partner连同他们的联系人一起导入 # -*- encoding: utf-8 -*- import xmlrpclib import xlrd import base64 DB = ´TESTDB´#帐套名 USERNAME = ´admin´#用户名 USERPASS = ´1´#密码 IMAGELOCATION=´E:\IMG´ #图片的根目录地址 #读取excel文件 fname = &quot;E:TEST.xls&quot; #excel表格地址 bk = xlrd.open_workbook(fname) #按名字取sheet sh = bk.sheet_by_name(&quot;JOSHUA&quot;) #登陆取uid sock_common = xmlrpclib.ServerProxy (´http://localhost:8069/xmlrpc

Configuring XML-RPC behavior for IIS-hosted .SVC file?

孤街醉人 提交于 2019-11-29 07:46:12
I'm using Clemens Vasters' XML-RPC implementation to implement an XML-RPC endpoint. When I host the service in a console application, it works fine. I'd like to host it in an ASP.NET MVC application, so I'm using a .SVC file. This is partially working. When I browse to the .SVC file, I see the usual "You have created a service" stuff. However, when I point my XML-RPC client (Windows Live Writer) at the same location, I get a "400 Bad Request". I'm guessing that this is because my service isn't correctly exposed as XML-RPC. I've attempted to configure an endpoint behavior in Web.config , as

Set timeout for xmlrpclib.ServerProxy

a 夏天 提交于 2019-11-29 05:56:25
问题 I am using xmlrpclib.ServerProxy to make RPC calls to a remote server. If there is not a network connection to the server it takes the default 10 seconds to return a socket.gaierror to my program. This is annoying when doing development without a network connection, or if the remote server is down. Is there a way to update the timeout on my ServerProxy object? I can't see a clear way to get access to the socket to update it. 回答1: An more straightforward solution is at: http://www.devpicayune

How to create new post with photo attached in WordPress using XMLRPC?

自古美人都是妖i 提交于 2019-11-29 00:18:18
Anyone knows how to create new post with photo attached in WordPress using XMLRPC? I am able to create new post and upload new picture separately, but looks like there is no way to attach the uploaded photo to the created post? Below is the codes I'm currently using. <?php DEFINE('WP_XMLRPC_URL', 'http://www.blog.com/xmlrpc.php'); DEFINE('WP_USERNAME', 'username'); DEFINE('WP_PASSWORD', 'password'); require_once("./IXR_Library.php"); $rpc = new IXR_Client(WP_XMLRPC_URL); $status = $rpc->query("system.listMethods"); // method name if(!$status){ print "Error (".$rpc->getErrorCode().") : "; print