编程语言
首页 > 编程语言> > python – suds和choice标签

python – suds和choice标签

作者:互联网

如何使用“choice”参数生成对方法的请求?

wsdl在http://127.0.0.1/service?wsdl的一部分:

<xs:complexType name="ByA">
<xs:sequence>
...
</xs:sequence>
</xs:complexType>
<xs:complexType name="ByB">
<xs:sequence>
...
</xs:sequence>
</xs:complexType>

<xs:complexType name="GetMethodRequest">
<xs:choice>
<xs:element name="byA" type="s0:ByA" />
<xs:element name="byB" type="s0:ByB" />
</xs:choice>
</xs:complexType>

当我做

from suds.client import Client
client = Client("http://127.0.0.1/service?wsdl")
print client

我知道了

GetMethod()

没有任何论据.

如何用byA或byB调用GetMethod?

解决方法:

这是肥皂水中的一个已知错误
https://fedorahosted.org/suds/ticket/342

标签:python,wsdl,suds,choice
来源: https://codeday.me/bug/20190531/1187470.html