Python 获取web服务的完整路径';从wsdl文件中删除方法

Python 获取web服务的完整路径';从wsdl文件中删除方法,python,wsdl,suds,Python,Wsdl,Suds,我正在使用suds库python2.7,我想从wsdl文件中获得所有方法的完整路径。 我使用以下代码从wsdl文件获取方法列表: from suds.client import Client url = "http://www.webservicex.net/country.asmx?WSDL" client = Client(url) list_of_methods = [method for method in client.wsdl.services[0].ports[0].method

我正在使用suds库python2.7,我想从wsdl文件中获得所有方法的完整路径。 我使用以下代码从wsdl文件获取方法列表:

from suds.client import Client

url = "http://www.webservicex.net/country.asmx?WSDL"
client = Client(url)
list_of_methods = [method for method in client.wsdl.services[0].ports[0].methods]
我得到了这样的结果:

[GetCurrencyCodeByCurrencyName, GetCurrencyByCountry, GetCurrencyCode, GetCountries, GetCurrencies, GetISOCountryCodeByCountyName, GetISD, GetCountryByCurrencyCode, GetGMTbyCountry, GetCountryByCountryCode]
[http://www.webserviceX.NET/GetCountryByCountryCode, ...]
但我想得到这样的东西:

[GetCurrencyCodeByCurrencyName, GetCurrencyByCountry, GetCurrencyCode, GetCountries, GetCurrencies, GetISOCountryCodeByCountyName, GetISD, GetCountryByCurrencyCode, GetGMTbyCountry, GetCountryByCountryCode]
[http://www.webserviceX.NET/GetCountryByCountryCode, ...]

那么,我该怎么做呢?

使用端口的
qname
属性怎么样

from suds.client import Client
url = "http://www.webservicex.net/country.asmx?WSDL"

client = Client(url)
port = client.wsdl.services[0].ports[0]
list_of_methods = [port.qname[1] + '/' + method for method in port.methods]
print(list_of_methods)

使用端口的
qname
属性怎么样

from suds.client import Client
url = "http://www.webservicex.net/country.asmx?WSDL"

client = Client(url)
port = client.wsdl.services[0].ports[0]
list_of_methods = [port.qname[1] + '/' + method for method in port.methods]
print(list_of_methods)

谢谢你的回答谢谢你的回答