谁能告诉我为什么我在 SOAPpy 中收到此错误?
server = SOAPpy.WSDL.Proxy(wdf)
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
server = SOAPpy.WSDL.Proxy(wdf)
File "C:\Python27\lib\soapy\SOAPpy\WSDL.py", line 62, in __init__
self.wsdl = reader.loadFromStream(stream, wsdlsource)
File "C:\Python27\lib\soapy\SOAPpy\wstools\WSDLTools.py", line 28, in loadFromStream
document = DOM.loadDocument(stream)
File "C:\Python27\lib\soapy\SOAPpy\wstools\Utility.py", line 572, in loadDocument
return xml.dom.minidom.parse(data)
File "C:\Python27\lib\xml\dom\minidom.py", line 1911, in parse
return expatbuilder.parse(file)
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 928, in parse
result = builder.parseFile(file)
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
ExpatError: syntax error: line 1, column 0
server = SOAPpy.WSDL.Proxy(wdf)
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
server = SOAPpy.WSDL.Proxy(wdf)
File "C:\Python27\lib\soapy\SOAPpy\WSDL.py", line 62, in __init__
self.wsdl = reader.loadFromStream(stream, wsdlsource)
File "C:\Python27\lib\soapy\SOAPpy\wstools\WSDLTools.py", line 28, in loadFromStream
document = DOM.loadDocument(stream)
File "C:\Python27\lib\soapy\SOAPpy\wstools\Utility.py", line 572, in loadDocument
return xml.dom.minidom.parse(data)
File "C:\Python27\lib\xml\dom\minidom.py", line 1911, in parse
return expatbuilder.parse(file)
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 928, in parse
result = builder.parseFile(file)
File "C:\Python27\lib\xml\dom\expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
ExpatError: syntax error: line 1, column 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
用这个
Use this one
您尝试加载的文件可能无效。它的语法无效。
以下代码适用于保存为 wsdl.xml 的有效 wsdl 文件。
Probably file you are trying to load is invalid. It has invalid syntax.
Following code should work for valid wsdl file saved as wsdl.xml.