开发者社区> 问答> 正文

用python去调用webservice时纠结了大半天,老是报错,求帮忙指导一下?报错

今天使用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

展开
收起
爱吃鱼的程序员 2020-06-10 13:52:48 851 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    楼主这个问题解决了吗?

    我也碰到啦

     

    2020-06-10 13:53:06
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载