Python Zeep:无法使用具有另一命名空间的负载设置请求
Zeep版本:2.4.0 嗨 我是Zeep的新手,能够构造soap客户端并解析响应。 我的一个请求遇到了问题,我们无法基于有效负载构建该请求 请求:Python Zeep:无法使用具有另一命名空间的负载设置请求,python,soap,wsdl,zeep,Python,Soap,Wsdl,Zeep,Zeep版本:2.4.0 嗨 我是Zeep的新手,能够构造soap客户端并解析响应。 我的一个请求遇到了问题,我们无法基于有效负载构建该请求 请求: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.csd.rsa.com"> <soapenv:Header/> <soapenv:Body><ws:updat
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.csd.rsa.com">
<soapenv:Header/>
<soapenv:Body><ws:updateUser>
<ws:request>
<ws:credentialManagementRequestList>
<ws:acspManagementRequestData>
<ws:credentialProvisioningStatus>ACTIVE</ws:credentialProvisioningStatus>
<ws:payload xsi:type="ns835:OOBSMSManagementRequest" xmlns:ns835="http://ws.oobsms.csd.rsa.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--Optional:-->
<!--Optional:-->
<ws1:action xmlns:ws1="http://ws.oobgen.csd.rsa.com">ADD</ws1:action>
<!--Zero or more repetitions:-->
<ws1:contactList xmlns:ws1="http://ws.oobgen.csd.rsa.com">
<!--Optional:-->
<ws1:isDefault>true</ws1:isDefault>
<ws1:phoneNumber>${#Project#phoneNumber}</ws1:phoneNumber>
<ws1:countryCode>${#Project#countryCode}</ws1:countryCode>
<ws1:areaCode>${#Project#areaCode}</ws1:areaCode>
<ws1:label>${#Project#label}</ws1:label>
<!--Optional:-->
<!--Optional:-->
<!--Optional:-->
<!--Optional:-->
<!--Optional:-->
</ws1:contactList>
</ws:payload>
</ws:acspManagementRequestData>
</ws:credentialManagementRequestList>
<ws:runRiskType>ALL</ws:runRiskType>
</ws:request>
</ws:updateUser>
update\u user\u request=self.soap.client.get\u类型('ns0:UpdateUserRequest')
self.soap.service.updateUser(更新用户请求(**更新oob\U sms))
响应:TypeError:{}AcspManagementRequest()获取了一个
意外的关键字参数“contactList”。签名:操作码:xsd:string
当我打字时
打印(客户端.get_类型('ns0:AcspManagementRequest'))
答复:
AcspManagementRequest({}AcspManagementRequest(操作码:xsd:string))
看起来它只接受字符串。若我尝试将有效负载值转换为字符串并发送,则得到的响应为故障:未知。好心帮忙
update_oob_sms = {'credentialManagementRequestList': {
'acspManagementRequestData': {
'credentialProvisioningStatus': 'ACTIVE',
'payload': {
'@type': 'ns835:OOBSMSManagementRequest',
'action': 'ADD',
'contactList': {
'isDefault': 'true',
'phoneNumber': '4332223',
'countryCode': '972',
'areaCode': '50',
'label': 'label'
}
}
}
}}