今天使用python去调用webservice时纠结了大半天,老是报错,求帮忙指导一下
源码如下:
from suds.client import Client
def webservice(): #
u"""创建WebService请求"""
url = 'http://.....此处省略.asmx'
client = Client(url)
result = client.service
return result
websev = webservice()
ws = websev.SendBatchMASBySoap()
报错信息如下:
Traceback (most recent call last):
File "E:/PythonWork/cc/public/ShortMessage.py", line 23, in <module>
client = Client(url)
File "build\bdist.win-amd64\egg\suds\client.py", line 112, in __init__
File "build\bdist.win-amd64\egg\suds\reader.py", line 152, in open
File "build\bdist.win-amd64\egg\suds\wsdl.py", line 136, in __init__
File "build\bdist.win-amd64\egg\suds\reader.py", line 79, in open
File "build\bdist.win-amd64\egg\suds\reader.py", line 101, in download
File "build\bdist.win-amd64\egg\suds\sax\parser.py", line 136, in parse
File "C:\Python27\lib\xml\sax\expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "C:\Python27\lib\xml\sax\xmlreader.py", line 123, in parse
self.feed(buffer)
File "C:\Python27\lib\xml\sax\expatreader.py", line 211, in feed
self._err_handler.fatalError(exc)
File "C:\Python27\lib\xml\sax\handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: <unknown>:68:16: mismatched tag
楼主这个问题解决了吗?
我也碰到啦
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。