如何使用 Zeep(Python 的 SOAP 客户端)和嵌套数据创建复杂参数?

How to create complex arguments with Zeep (SOAP client for Python) and nest data?

我需要将一些嵌套数据传递给我的 SOAP 客户端,我想我知道如何创建复杂的参数...

id = ucmdb.get_type('ns17:ID')

现在我想给这个'ci'一些"arguments",我该怎么办? 我将使用我知道如何使用的旧 Suds 的示例来展示我的意思:

id = ucmdb.factory.create('ns17:ID') #complex
id._temp = "true" #first "argument"
id.value = dict['logical_name'] #second "argument"

我如何使用 Zeep 做到这一点?

查看 http://docs.python-zeep.org/en/latest/in-depth.html 中的 "Using SOAP headers" 部分。

我能够使用该信息编写与 Zuora 集成的脚本,并且需要 Soap Header 中的复杂类型。参见 http://community.zuora.com/t5/API/Python-quickstart/m-p/10779/highlight/true#M403