の方法でClient
のWebサービスに電話する必要があります。
>>> from suds.client import Client
>>> c = Client('https://www.e-conomic.com/secure/api1/EconomicWebService.asmx?WSDL')
>>> c.service.Account_Create(10, '20', 'ProfitAndLoss')
------------------------------------------------------------
Traceback (most recent call last):
File "<ipython console>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/client.py", line 240, in __call__
return target.call(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/client.py", line 379, in call
return method(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/client.py", line 240, in __call__
return target.call(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/client.py", line 422, in call
return client.invoke(args, kwargs)
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/client.py", line 480, in invoke
result = self.send(msg)
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/client.py", line 511, in send
result = self.failed(binding, e)
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/client.py", line 562, in failed
r, p = binding.get_fault(reply)
File "/usr/lib/python2.7/site-packages/suds-0.3.6-py2.7.egg/suds/bindings/binding.py", line 226, in get_fault
raise WebFault(p, faultroot)
WebFault: Server raised fault: 'Economic.Api.Exceptions.AuthenticationException(E02250): User is not authenticated. Access denied. {id=131496672}'
ユーザーが認証されていないため、このエラーが発生しました。ユーザーを認証するためのサービスやキーがあります。あなたはその鍵を必要とし、サービスを呼び出すことができます。 -
にここで答えへのリンク、すべてのXMLレスポンスを取得します: http://stackoverflow.com/a/27302096/4325298 –