0

肥皂请求:

<ws:credentialManagementRequestList> <ws:acspManagementRequestData>
<ws:credentialProvisioningStatus>ACTIVE</ws:credentialProvisioningStatus>
<ws:payload xsi:type="ws:OTPManagementRequest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</ws:acspManagementRequestData> </ws:credentialManagementRequestList>

复杂类型:

<xsd:complexType name="AcspManagementRequestData">
<xsd:annotation
<xsd:documentationThis type defines the Credential Management Request Payload</xsd:documentation>
</xsd:annotation>
<xsd:sequence
<xsd:element name="credentialProvisioningStatus" minOccurs="0" type="rsa_csd:CredentialProvisioningStatus" />
<xsd:element name="payload" minOccurs="0" type="rsa_csd:AcspManagementRequest" />
</xsd:sequence>
</xsd:complexType>

请帮助如何为 ws:payload 元素构建字典

创建的字典对象:

{'credentialManagementRequestList': { 'acspManagementRequestData': { 'payload': { '@type' : 'OTPManagementRequest' } } }}

得到错误:

TypeError: {http://ws.csd.rsa.com}AcspManagementRequest() got an unexpected keyword argument >'@type'. Signature: opcode: xsd:string
4

1 回答 1

0

回答我自己的问题:

我应该获取 OTPManagement 对象的类型,而不是解析 @type 。

"payload': { client.get_type('ns0:OTPManagementRequest') }

于 2017-10-18T14:48:34.943 回答