How can I consume wsdl url in python

Viewed 1703

I want to consume data from WSDL url, I don't know how would I do in python.

Can anyone help me with the example

here is the WSDL link for reference : http://43.242.214.173/cwplservice/cwplonline.svc?wsdl

Here is code snippet which I have tried.

from suds.client import Client
from suds.xsd.doctor import Import, ImportDoctor

url = 'http://43.242.214.173/cwplservice/cwplonline.svc?wsdl' 
imp = Import('http://212.235.42.50/WebService/service.php?class=masterPricer', location='https://www.w3.org/2001/XMLSchema.xsd') 
imp.filter.add('http://www.w3.org/2001/XMLSchema')
client = Client(url, doctor=ImportDoctor(imp))
print client

when I run the code I am getting following error as suds.TypeNotFound: Type not found: '(schema, http://www.w3.org/2001/XMLSchema, )'

1 Answers
Related