如何在 Python 3.5 中调用 Web 服务 (WSDL/SOAP) 中的方法
How to call method in web service (WSDL/SOAP) in Python 3.5
我正在尝试从 Web 服务 (WSDL/SOAP) 调用方法,并且还想禁用证书验证,因为 Python 默认情况下会这样做。我当前的 Python 版本是 3.5.1
安装了 suds-jurko(在我的案例中,suds 安装失败,因为我使用的是 Python 3.5)并编写了以下代码。
from suds.client
import Client import ssl
#Override the default behaviour of the Python 3 for the certificate validation (though it is not recommended)
ssl._create_default_https_context = ssl._create_unverified_context
url = 'https://????.asmx?wsdl'
client = Client(url)
print(client.service.method_name(param))
我正在尝试从 Web 服务 (WSDL/SOAP) 调用方法,并且还想禁用证书验证,因为 Python 默认情况下会这样做。我当前的 Python 版本是 3.5.1
安装了 suds-jurko(在我的案例中,suds 安装失败,因为我使用的是 Python 3.5)并编写了以下代码。
from suds.client
import Client import ssl
#Override the default behaviour of the Python 3 for the certificate validation (though it is not recommended)
ssl._create_default_https_context = ssl._create_unverified_context
url = 'https://????.asmx?wsdl'
client = Client(url)
print(client.service.method_name(param))