简体   繁体   English

Soap 请求在 Soapui 中工作正常,但在 python - ZEEP - SUDS 中不能正常工作

[英]Soap request works fine in Soapui but not in python - ZEEP - SUDS

I have a request to a soap webservice which is working fine in SoapUi.我有一个 soap 网络服务的请求,它在 SoapUi 中运行良好。 I'd like to call this webservice in a python script.我想在 python 脚本中调用这个网络服务。

I tried some modules: zeep, suds,... but I always have an SSL error.我尝试了一些模块:zeep、suds、...但我总是遇到 SSL 错误。

Here are the infos:以下是信息:

https://37.71XXXXXXACONYX?wsdl https://37.71XXXXXXACNYX?wsdl

Basic authentification: username + password基本认证:用户名+密码

Authentification type: preemptive认证类型:抢先式

I have the xml available in SoapUi.我在 SoapUi 中有可用的 xml。

Does someone have any ideas?有人有什么想法吗?

Thanks a lot !!非常感谢 !!

I tried:我试过了:

from requests.auth import HTTPBasicAuth  # or HTTPDigestAuth, or OAuth1, etc.
from requests import Session
from zeep import Client
from zeep.transports import Transport

session = Session()
session.auth = HTTPBasicAuth(user, password)
client = Client('https://37.71XXXXXXACONYX?wsdl',
            transport=Transport(session=session))

Fyi: I tried to add: session.verify = False仅供参考:我尝试添加:session.verify = False

...but it doesn't solve the pb. ...但它不能解决铅。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM