Python suds client and not standard service name

╄→尐↘猪︶ㄣ 提交于 2021-01-29 07:19:59

问题


Look at this example:

from suds.client import Client
url = 'http://xxx.yy.com/etc...'
client = Client(url)
result = client.service.wsExtAuth..ckAuth(username='xx')

The service "wsExtAuth..ckAuth" is not standard (name) and compiler return syntax error. How can I use it?


回答1:


You could try:

getattr(client.service, 'wsExtAuth..ckAuth')(username='xx')

Also, make sure you're using suds-jurko and not the outdated suds client.



来源:https://stackoverflow.com/questions/34539092/python-suds-client-and-not-standard-service-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!