使用Python-Zeep向WSDL URL提出肥皂请求

发布于 2025-01-17 10:39:08 字数 803 浏览 1 评论 0原文

我试图提出SOAP请求并遇到几个问题,我需要您的帮助来解决错误

from zeep import Client
client = Client(wsdl='http://<placeholder>/<serviceholder>.svc?wsdl')
response = client.service.MethodName(secret_code,secret_key,data.__str__())

并获得以下错误,

**zeep.exceptions.XMLSyntaxError: The XML returned by the server does not contain a valid {http://schemas.xmlsoap.org/soap/envelope/}Envelope root element. The root element found is HTML**

我需要2个输入,

  1. methodName(secret_code,sertod_key,secret_key,data .__ str.__ str.__ str.__ ())实际上需要data.tostring()从c#开始。我什至可以在Python中使用此__ str __吗?还是我应该使用其他东西? (只要告诉我Python中的ToString()等效方法

  2. (只要

这确实意味着很多,因为我什至无法入睡或解决此错误。我很困惑!请

提前感谢

Im trying to make a SOAP request and running into a couple of issues and I would need your help in resolving the error

from zeep import Client
client = Client(wsdl='http://<placeholder>/<serviceholder>.svc?wsdl')
response = client.service.MethodName(secret_code,secret_key,data.__str__())

and getting the following error

**zeep.exceptions.XMLSyntaxError: The XML returned by the server does not contain a valid {http://schemas.xmlsoap.org/soap/envelope/}Envelope root element. The root element found is HTML**

I need 2 inputs,

  1. The MethodName(secret_code,secret_key,data.__str__()) actually needs data.ToString() as that from c#. Am I even right to use this __str__ in python or should I use something else?
    ( Just tell me the equivalent method of ToString() in python

  2. Please tell me why Im getting that zeep.exception!

It would really mean a lot as I can't even sleep or resolve this error. Im so stuck! please help

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文