Hi
I'm new to suds (have just downloaded it after getting frustrated with
SOAPpy).
I'm trying to connect to a WSDL which requires basic HTTP authentication. I
have been able to connect to it correctly using PHP but I need to use
Python.
This is my code:
#!/usr/bin/python
Username = "user"
Password = "pass123"
from suds.transport.http import HttpAuthenticated
t = HttpAuthenticated(username=Username, password=Password)
# WSDL is only available in internal network
WSDL = "http://localhost:18080/external/services/DomService?wsdl"
from suds.client import Client
client = Client(WSDL, transport=t)
And this is the error it returns:
Traceback (most recent call last):
File "./wsdltest.py", line 25, in <module>
client = Client(wsdl, transport=t)
File "build/bdist.linux-i686/egg/suds/client.py", line 112, in __init__
File "build/bdist.linux-i686/egg/suds/reader.py", line 152, in open
File "build/bdist.linux-i686/egg/suds/wsdl.py", line 136, in __init__
File "build/bdist.linux-i686/egg/suds/reader.py", line 79, in open
File "build/bdist.linux-i686/egg/suds/reader.py", line 101, in download
File "build/bdist.linux-i686/egg/suds/sax/parser.py", line 136, in parse
File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 125, in parse
self.close()
File "/usr/lib/python2.5/xml/sax/expatreader.py", line 217, in close
self.feed("", isFinal = 1)
File "/usr/lib/python2.5/xml/sax/expatreader.py", line 211, in feed
self._err_handler.fatalError(exc)
File "/usr/lib/python2.5/xml/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: <unknown>:1:0: no element found
Any help would be really appreciated.
Thanks in advance!
Janet