1

我尝试使用python suds访问网络,代码如下。

#!/usr/bin/python
from suds.client import Client  
url = 'http://192.168.80.1xx:8079/rpc/soap/jirasoapservice-v2?wsdl'  
client = Client(url)  
print client  

在具有以下字符的机器A上:
ubuntu系统
ip添加为192.168.1.xx
python版本为2.6.5
可以连接互联网。
已安装 easy_install 0.6.10 和 suds 0.3.7。

另一台机器B:
ubuntu系统
ip添加为192.168.80.xx
python版本为2.6.5
离线。
已安装 setuptools-0.6c11-py2.6.egg 和 suds 0.3.7。

在机器A上,上面的代码是好的,而在机器B上,有一些错误:

Traceback (most recent call last):
  File "soaptest.py", line 7, in <module>
    client = Client(url)  
  File "build/bdist.linux-x86_64/egg/suds/client.py", line 109, in __init__
  File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 194, in __init__
  File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 255, in build_schema
  File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 90, in load
  File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 280, in open_imports
  File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 280, in open_imports
  File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 280, in open_imports
  File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 280, in open_imports
  File "build/bdist.linux-x86_64/egg/suds/xsd/schema.py", line 277, in open_imports
  File "build/bdist.linux-x86_64/egg/suds/xsd/sxbasic.py", line 608, in open
  File "build/bdist.linux-x86_64/egg/suds/xsd/sxbasic.py", line 626, in download
  File "build/bdist.linux-x86_64/egg/suds/sax/parser.py", line 134, in parse
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/xml/sax/expatreader.py", line 211, in feed
    self._err_handler.fatalError(exc)
  File "/usr/lib/python2.6/xml/sax/handler.py", line 38, in fatalError
    raise exception
xml.sax._exceptions.SAXParseException: /tmp/suds/suds-2582214468910359336.http:1:156: mismatched tag
4

0 回答 0