Reputation: 135
I'm connecting to wsdl using suds library
from suds.client import Client
url = 'http://localhost:0000/webservices/WebService?wsdl'
client = Client(url)
WSDL contains come xml code:
<wsdl:message name="GetRequest">
<wsdl:part element="types:GetVersion" name="body"></wsdl:part>
<wsdl:part element="comm:Credentials" name="credentials"></wsdl:part>
</wsdl:message>
How can I get this xml from wsdl and parse it in python?
Upvotes: 1
Views: 1593
Reputation: 126
I suppose you want to parse the xml in order to get the functions and theirs parameters?
You already got with the object Client.
If you try, print Client
you should get the information you need.
You can also try something like that:
functions = [m for m in client.wsdl.services[0].ports[0].methods]
print "functions --> ", functions
Upvotes: 1