pythonweb-servicessoapwsdlpysimplesoap

pysimplesoap Cannot determine service in WSDL: SOAP version: soap11


I created a simple web service and consumed it with pysimplesoap. Then I added ssl to the service(self signed) and tried to do the same but I am getting the error:

RuntimeError: Cannot determine service in WSDL: SOAP version: soap11

This is my code:

from pysimplesoap.client import SoapClient
import base64
import ssl
base64string = base64.encodestring('%s:%s' % ('username', 'password')).replace('\n', '')

ssl._create_default_https_context = ssl._create_unverified_context
authenticationHeader = {

    "Authorization" : "Basic %s" % base64string,
}
client = SoapClient(wsdl="https://10.0.120.138/service.svc?wsdl",trace=True,http_headers=authenticationHeader)


response = client.method("param")
print response

Does anyone know why I am getting the error? I have a feeling I need to configure something..


Solution

  • This is not really an answer for the problem above but it is a solution.. I switched to zeep library and everything works now.