http://www.douban.com/group/topic/30890518/
各位豆友,最近用python开发一个小项目,调用服务商提供的webservice接口(http://202.105.212.1
本人对soap和suds不熟,诚心向各位求教。
import suds
url='http://202.105.212.1
client=suds.client.Client(url)
print(client)
======================print(client)===========================================
Suds ( https://fedorahosted.org/suds/ ) version: 0.4.1 jurko 3
Service ( SendSMSService ) tns="http://202.105.212.146:8080/jboss-net/services/SendSMS"
Prefixes (2)
ns0 = "http://202.105.212.146:8080/jboss-net/services/SendSMS"
ns1 = "http://schemas.xmlsoap.org/soap/encoding/"
Ports (1):
(SendSMS)
Methods (4):
qryOffLinesMS(xs:string ucNumber,xs:string ucPinNum,xs:string rand,xs:string connID)
qrySendSMsstat(xs:string ucNumber,xs:int smsFlag,xs:string connID)
sendSMS(xs:string uc,xs:string pw,ArrayOf_xsd_string callee,xs:string isreturn,xs:string cont,xs:int msgid,xs:string connID)
sendSMSV2(xs:string uc, ArrayOf_xsd_string callee,xs:int msgiD,xs:string connID,xs:int charset)
Types (49):
ns1:Array
ArrayOf_xsd_string
ns1:ENTITIES
ns1:ENTITY
=========================================
答案:
刚才测试成功,
client = Client(wsdl_url)
array = client.factory.create('ns1:Array')
array.item = ['mobile1','mobile2']
将array带入参数即可。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。