Am无法从python调用webservice
我需要通过python调用TestDebitsAccess web服务 我正在使用suds模块Am无法从python调用webservice,python,web-services,soap,suds,Python,Web Services,Soap,Suds,我需要通过python调用TestDebitsAccess web服务 我正在使用suds模块 from suds.client import Client class User: Username='' Password='' class Request: User ExternalAccountReferenceNo = '' client = Client('https://testservices.debitsucces
from suds.client import Client
class User:
Username=''
Password=''
class Request:
User
ExternalAccountReferenceNo = ''
client = Client('https://testservices.debitsuccess.com/DSWebService/DSServices.svc?wsdl')
request = Request()
我仅使用正确的数据初始化请求对象
client.service.GetCustomerAccountByAccountId(request)
我的一个朋友通过php调用了这个,因为他得到了正确的结果
但是我得到了这个错误
服务器引发错误:“输入验证错误”
请帮帮我,那不是有效的Python。你的方法被误导了。看看suds office,了解如何使用。回答可能也会对您有所帮助。您好Mauro Baraldi,您的回答现在帮助了我的代码工作,我所做的更改取代了使用客户机创建普通python类创建的类,如request=client.factory.create('ns2:RequestRetrieveCustomerAccountByAccountID'))现在分配了所需的值,然后称为client.service.GetCustomerAccountByAccountId(请求),现在可以工作了