1

我正在尝试通过 Python 的 SOAP 接口访问捷克商业注册表 ARES,但出现错误

Traceback (most recent call last):
  File "ares.py", line 23, in <module>
    print client.service.GetXmlFile(query)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 542, in __call__
    return client.invoke(args, kwargs)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
    result = self.send(soapenv)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 643, in send
    result = self.succeeded(binding, reply.message)
  File "/usr/lib/python2.7/site-packages/suds/client.py", line 678, in succeeded
    reply, result = binding.get_reply(self.method, reply)
  File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 151, in get_reply
    self.detect_fault(soapbody)
  File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 182, in detect_fault
    raise WebFault(p, fault)
suds.WebFault

我正在使用以下代码:

#!/usr/bin/python
import sys
import logging

handler = logging.StreamHandler(sys.stderr)
logger = logging.getLogger('suds.transport.http')
logger.setLevel(logging.DEBUG), handler.setLevel(logging.DEBUG)
logger.addHandler(handler)

from suds.client import Client

ARES = "http://wwwinfo.mfcr.cz/ares/xml_doc/wsdl/standard.wsdl"

client = Client(ARES)
query = client.factory.create('ns3:dotaz')

query.Pomocne_ID = 1
query.Typ_vyhledani = "FREE"
query.Klicove_polozky.ICO = 27074358
query.Max_pocet = 10


print client.service.GetXmlFile(query)

但我完全是 suds/python/SOAP 新手,有没有人知道哪里可能有问题?

4

0 回答 0