python实现简单的soap客户端,pythonsoap客户端,# $Id: testq
文章由Byrx.net分享于2019-03-23 05:03:50
python实现简单的soap客户端,pythonsoap客户端,# $Id: testq
# $Id: testquote.py 2924 2006-11-19 22:24:22Z fredrik $# delayed stock quote demo (www.xmethods.com)from elementsoap.ElementSOAP import *class QuoteService(SoapService): url = "http://66.28.98.121:9090/soap" # Put webservice URL here. def getQuote(self, symbol): action = "urn:xmethods-delayed-quotes#getQuote" request = SoapRequest("{urn:xmethods-delayed-quotes}getQuote") # Create the SOAP request SoapElement(request, "symbol", "string", symbol) # Add parameters response = self.call(action, request) # Call webservice return float(response.findtext("Result")) # Parse the answer and return itq = QuoteService()print "MSFT", q.getQuote("MSFT")print "LNUX", q.getQuote("LNUX")
相关内容
- Python实现简单的web服务器,pythonweb服务器,本代码运行后
- python通过代理服务器访问ftp服务,pythonftp,None
- python高强度密码生成器,python高强度生成器,一个pytho
- python中字典dict的常用操作方法,python字典dict,下面的
- 使用Python27抓取模板之家的CSS模板,python27css,#!/usr/bin
- python获得linux物理内存大小,pythonlinux,python获得linu
- 教案生成器(.doc格式),教案生成器.doc格式,# -*- cod
- Linux环境下监控目录变化的Python代码片段,,这段代码可
- python实现的ping功能,python实现ping,#!/usr/bin/e
- 希尔排序算法的python实现,希尔算法python,def shellSor
评论关闭