PysimpleSOAP无效的args structu

2024-09-30 20:35:44 发布

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

我在调用webservice方法时遇到问题,我

client = SoapClient(wsdl="address")
countries = {'countryCode':1, 'webapiKey':'apiKey'};
client.doGetCountries(**countries)

但我错了

ValueError: Invalid Args Structure. Errors: ["type mismatch for value. master(<class 'dict'>): {'DoGetCountriesRequest': *{'countryCode': <class 'int'>, 'webapiKey': <class 'str'>}*}, test(<class 'dict'>): {'DoGetCountriesRequest': {'webapiKey': 'webapi', 'countryCode': 1}}"]

所以我想我提供了错误的args结构,但我不知道如何修复它?在

有什么建议吗?在


Tags: 方法clientwebaddressservicecountriesdictclass