我正在尝试与以下 Web 服务集成: http ://demo.eu.yellowfin.com.au/services/AdministrationService?wsdl
不幸的是,我没有找到任何关于 pysimplesoap 的信息可以帮助我弄清楚如何在我的情况下提出请求:
我到目前为止:
from pysimplesoap.client import SoapClient
yellowfin_url = 'http://demo.eu.yellowfin.com.au/services/AdministrationService?wsdl'
c = SoapClient(wsdl=yellowfin_url, soap_ns='soap', trace=False)
req = c.services['AdministrationServiceService']['ports']['AdministrationService']['operations']['remoteAdministrationCall']['input']['remoteAdministrationCallRequest']
req['in0']['loginId'] = 'admin@yellowfin.com.au'
req['in0']['password'] = 'test'
req['in0']['function'] = 'LOGINUSER'
req['in0']['orgId'] = 1
req['in0']['person']['userId'] = 'myuser@user.com'
req['in0']['person']['password'] = 'reset123'
resp = c.remoteAdministrationCall()
我无法让复杂类型发送,所以我查看了对象的文档,我认为覆盖我需要的参数会起作用,但我提出的请求总是空的。
我试图将“undicted”有效负载作为普通关键字 args 传递,但没有用......我会使用其他东西,但这是唯一与 python3 兼容的库我只想知道是否有类似 suds 的东西在哪里我可以:
c = Client(yellowfin_url, faults=False)
req = c.factory.create('AdministrationServiceRequest')
并获取 xml 对象
有什么想法吗?
谢谢