捷克ARES通过python-suds中的SOAP错误suds.WebFault

时间:2012-11-09 23:38:02

标签: python soap suds

我试图通过Python的SOAP接口访问ARES,Czech Business注册表,我收到错误

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新手,有没有人知道哪里可能有问题?

0 个答案:

没有答案