如何使用zeep生成List<String>?

2024-09-29 23:15:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用Python库zeep与SOAP服务对话。文档中需要的参数之一是List<String>类型,我在WSDL中找到了以下内容:

<xs:element minOccurs="0" maxOccurs="1" name="IncludedLenders" type="tns:ArrayOfString"/>

我相信AraryOfString的定义是:

^{pr2}$

我如何让zeep产生价值?我试过:

"IncludedLenders": [
  "BMS",
  "BME"
]

但这会产生:

                <ns0:IncludedLenders>
                    <ns0:string>BMS</ns0:string>
                </ns0:IncludedLenders>

而不是:

                <ns0:IncludedLenders>
                    <ns0:string>BMS</ns0:string>
                    <ns0:string>BME</ns0:string>
                </ns0:IncludedLenders>

有什么想法可以产生后一个?在


Tags: 文档类型参数string对话soaplistwsdl

热门问题