PySimpleSoap 和 wsdl
PySimpleSoap and wsdl
我正在尝试与以下 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" 有效负载作为普通关键字参数传递给内部,但没有成功...
我会使用其他东西,但这是唯一与 python3 兼容的库
我只想知道是否有像肥皂水这样的东西我可以做:
c = Client(yellowfin_url, faults=False)
req = c.factory.create('AdministrationServiceRequest')
并获取 xml 对象
有什么想法吗?
谢谢
尝试:
response = c.remoteAdministrationCall(
loginId='admin@yellowfin.com.au',
password='test',
function='LOGINUSER',
orgId=1,
person={'userId': 'myuser@user.com', 'password': 'reset123'}
)
我对人物部分不太确定。
您可以调用 c.help('remoteAdministrationCall')
来了解操作接受哪些参数和其他内容。
我正在尝试与以下 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" 有效负载作为普通关键字参数传递给内部,但没有成功... 我会使用其他东西,但这是唯一与 python3 兼容的库 我只想知道是否有像肥皂水这样的东西我可以做:
c = Client(yellowfin_url, faults=False)
req = c.factory.create('AdministrationServiceRequest')
并获取 xml 对象
有什么想法吗?
谢谢
尝试:
response = c.remoteAdministrationCall(
loginId='admin@yellowfin.com.au',
password='test',
function='LOGINUSER',
orgId=1,
person={'userId': 'myuser@user.com', 'password': 'reset123'}
)
我对人物部分不太确定。
您可以调用 c.help('remoteAdministrationCall')
来了解操作接受哪些参数和其他内容。