首页 > 解决方案 > 使用 Zeep 问题的工作日 SOAP API

问题描述

我们正在使用 python 的 zeep 包来调用 GMS 租户中的 Workday API。

领域:资源管理

操作:Get_Purchase_Orders

我们能够为资源管理下的每个其他端点获得成功的响应,但是,当我们尝试发送 Get_Purchase_Order 请求时,我们收到以下错误:

错误:

TypeError: {urn:com.workday/bsvc}Bill_To_Address_ReferenceType() got an unexpected keyword argument 'Address_Reference'. Signature: `({Bill_To_Address_Reference: {urn:com.workday/bsvc}Unique_IdentifierObjectType} | {Address_Reference: {urn:com.workday/bsvc}Address_ReferenceType[]})`

代码:

from zeep import Client, Settings
from zeep.wsse.username import UsernameToken

settings = Settings(strict=False, xml_huge_tree=True)
client = Client("<wsdl-url>", wsse=UsernameToken("<Username>", "<Pwd>"), settings=settings)
asDictParam = {"Count": 1}
x = client.service.Get_Purchase_Orders(Response_Filter=asDictParam)

有人可以帮忙吗。

注意:我们检查了 xsd 和 Bill_To_Address_ReferenceType 有 Address_Reference 作为接受的参数。

谢谢

标签: xmlsoapzeepworkday-api

解决方案


推荐阅读