suds-community / suds

Suds is a lightweight SOAP python client for consuming Web Services. A community fork of the jurko fork.
https://suds.readthedocs.io/
GNU Lesser General Public License v3.0
172 stars 54 forks source link

AttributeError: 'NoneType' object has no attribute 'promotePrefixes' #71

Closed jankor963 closed 2 years ago

jankor963 commented 2 years ago

Getting the error when using suds in python 2.7

My code looks like this -

from suds.client import Client import logging logging.basicConfig(level=logging.INFO) logging.getLogger('suds.client').setLevel(logging.DEBUG)

client = Client("http://...?wsdl")

a1 = client.factory.create('A1Type') a1.attribute1="a11value" a1.attribute2="a12value"

client.set_options(soapheaders=a1) client.set_options(location="http://...")

p1 = client.factory.create('P1Type') p1.attribute1="p11value" p1.attribute2="p12value"

resp=client.service.method(p1)


Traceback (most recent call last): File "C:\someDirectory\C0\pylib\site-packages\suds\client.py", line 542, in call return client.invoke(args, kwargs) File "C:\someDirectory\C0\pylib\site-packages\suds\client.py", line 602, in invoke result = self.send(soapenv) File "C:\someDirectory\C0\pylib\site-packages\suds\client.py", line 643, in send result = self.succeeded(binding, reply.message) File "C:\someDirectory\C0\pylib\site-packages\suds\client.py", line 643, in send result = self.succeeded(binding, reply.message) File "C:\someDirectory\C0\pylib\site-packages\suds\client.py", line 678, in succeeded reply, result = binding.get_reply(self.method, reply) File "C:\someDirectory\C0\pylib\site-packages\suds\bindings\binding.py", line 149, in get_reply soapenv.promotePrefixes() AttributeError: 'NoneType' object has no attribute 'promotePrefixes'

It seems like the whole wsdl is being returned. Soap webservice works in SOAP-UI with same XML soap request.