python调用webservice接口

文章目录


suds-py3 官方文档::https://suds-py3.readthedocs.io/en/latest/
WSDL文档:http://www.webxml.com.cn/zh_cn/index.aspx

首先安装suds-py3 , suds-jurko

pip install  suds-jurko

You will need to know the url for WSDL for each service used. Simply create a client for that service as follows:

#!python
from suds.client import Client
url = 'http://localhost:7080/webservices/WebServiceTestBean?wsdl'
client = Client(url)
print (cilent)

You can inspect service object with: str() as follows to get a list of methods provide by the service:
在这里插入图片描述

# 调用服务的接口
print(cilent.service.getAPmoney(compId='x',account='x',apName='s',apPassword='x'))
print(cilent.service.sendMessage(apName='x',apPassword='',compId='x',account='x',
calledNumber='1899566****',sendTime='',content='hh'))

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值