python返回类型为anytype_python - Zeep的SOAP请求(Python) - 堆栈内存溢出

我正在尝试使用python中的zeep模块发送SOAP请求。 python -mzeep XXXXXXXX.wsdl返回以下内容:

前缀:

xsd: http://www.AA.org/2003/XMLSchema

ns0: http://www.bbbb.com/PM/BLS

全局元素:

ns0:GetBalReq(header: ns0:RequestHeader, custId: xsd:string, customAvpList: ns0:AttributeValuePairList)

ns0:GetBalResp(nalId: xsd:string, custId: xsd:string, custRole: xsd:string, nalType: xsd:string, bal: ns0:BalDetailsList, customAvpList: ns0:AttributeValuePairList)

全局类型:

xsd:anyType

ns0:AttributeValuePair(attribute: xsd:string, value: xsd:string)

ns0:AttributeValuePairList(item: ns0:AttributeValuePair[])

ns0:BalDetailsList(item: ns0:BalDetails[])

ns0:RequestHeader(auditInfo: xsd:string, transactionId: xsd:string)

xsd:string

绑定:

Soap11Binding: {http://www.bbbb.com/PM/BLS}BLS

服务:BLS

Port: BLS (Soap11Binding: {http://www.bbbb.com/PM/BLS}BLS)

Operations:

getBalReq(header: ns0:RequestHeader, custId: xsd:string, customAvpList: ns0:AttributeValuePairList) -> nalId: xsd:string, custId: xsd:string, custRole: xsd:string, nalType: xsd:string, bal: ns0:BalDetailsList, customAvpList: ns0:AttributeValuePairList

只需遵循:

from zeep import Client

client = Client('XXXXXXXX.wsdl')

client.service.getBalReq(custId='12345678')

我收到以下错误:

"Missing element %s" % (self.name), path=render_path

zeep.exceptions.ValidationError: Missing element header (GetBalReq.header)

现在,我已经为最后两天动了脑筋,如何进行这项工作,如何发送适当的请求以获取有效的响应,阅读zeep文档,论坛等,但是却无法解决。 有适当代码的想法吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值