Hi, it'd help us to understand the issue, if you'd capture the network traffic with a tool like Wireshark or tcpdump, and post it to the mailing list with any sensitive information (including the base64-encoded credentials in the Authorization HTTP header) removed.
Regards, András Veres-Szentkirályi
2011. november 30. szerda 15:40:44 dátummal Remy de Boer ezt írta:
Hi,
I'm trying to connect to the SOAP interface of an innovaphone system. I'm using the following code to connect to the WSDL file:
from suds.client import Client
from suds.xsd.doctor import ImportDoctor, Import from suds.transport.http import HttpAuthenticated
imp = Import('http://schemas.xmlsoap.org/soap/encoding/') imp.filter.add('http://innovaphone.com/pbx') imp.filter.add('http://innovaphone.com/binding')
d = ImportDoctor(imp) url = 'http://localhost/pbx800.wsdl' t = HttpAuthenticated(username='****', password='****')
client = Client(url, transport=t, doctor=d)
print client print client.service.Version()
The WSDL file I'm using is the same as at: http://www.innovaphone.com/wsdl/pbx800.wsdl
With the 5th to last line (soap:address location) edited to point to our PBX server.
running the above script results in the following error:
File "sudstest.py", line 16, in <module>
print client.service.Version()
File
"/usr/lib/python2.6/site-packages/suds-0.4-py2.6.egg/suds/client.py", line 542, in __call__
return client.invoke(args, kwargs)
File
"/usr/lib/python2.6/site-packages/suds-0.4-py2.6.egg/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File
"/usr/lib/python2.6/site-packages/suds-0.4-py2.6.egg/suds/client.py", line 643, in send
result = self.succeeded(binding, reply.message)
File
"/usr/lib/python2.6/site-packages/suds-0.4-py2.6.egg/suds/client.py", line 678, in succeeded
reply, result = binding.get_reply(self.method, reply)
File
"/usr/lib/python2.6/site-packages/suds-0.4-py2.6.egg/suds/bindings/bindin g.py", line 149, in get_reply
soapenv.promotePrefixes()
AttributeError: 'NoneType' object has no attribute 'promotePrefixes'
When I quote out the "print client.service.Version()" line, it displays all the methods from the WSDL file, but when I leave it uncommented, the "print client" line doesn't get printed before the error comes up.
Any idea what's causing this error?
I'm using python version 2.6.6 and suds version 0.4
Thanks in advance!
-Remy