【问题标题】:How to generate Request & Response templates from WSDL in python如何在 python 中从 WSDL 生成请求和响应模板
【发布时间】:2017-07-05 13:34:34
【问题描述】:

我正在尝试从 WSDL 生成请求和响应模板。

我知道 SOAP UI 可以做到这一点,但我需要使用 Python。

我看到有一个名为 zeep 的 python 库,但它似乎更多地针对设置一个肥皂客户端和执行调用。

如何从 WSDL 获取请求?

这是我一直在使用的示例:

https://www.tutorialspoint.com/wsdl/wsdl_example.htm

【问题讨论】:

    标签: python soap


    【解决方案1】:

    您可以使用 zeep 创建请求 XML 文档,请参阅 http://docs.python-zeep.org/en/master/client.html#creating-the-raw-xml-documents

    【讨论】:

    • 是否可以关闭验证?出现验证错误,我无法控制服务和端点。 "Missing element %s" % (self.name), path=render_path) zeep.exceptions.ValidationError: Missing element Header
    猜你喜欢
    • 2020-04-11
    • 2016-06-24
    • 2023-03-15
    • 1970-01-01
    • 2014-07-13
    • 1970-01-01
    • 2012-06-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多