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
views:
15answers:
1
A:
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.
from SOAPpy import WSDL
wsdlFile = open('wsdl.xml')
server = WSDL.Proxy(wsdlFile)
Paweł
2010-10-18 18:40:10