Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Am无法从python调用webservice_Python_Web Services_Soap_Suds - Fatal编程技术网

Am无法从python调用webservice

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

我需要通过python调用TestDebitsAccess web服务

我正在使用suds模块

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(请求),现在可以工作了