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

Die*_*rán 5 python soap soap-client python-3.5

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

id = ucmdb.get_type('ns17:ID')
Run Code Online (Sandbox Code Playgroud)

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

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

我怎么能用Zeep做到这一点?

小智 0

查看http://docs.python-zeep.org/en/latest/in-depth.html中的“使用 SOAP 标头”部分。

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