我有以下 python 代码来设置 SOAP 请求的标头:
ebsheader = xsd.Element(
'{http://ebs.health.ontario.ca/}EBS',
xsd.ComplexType([
xsd.Attribute(
'Id',xsd.String()
),
xsd.Element(
'SoftwareConformanceKey', xsd.String()
),
xsd.Element(
'AuditId', xsd.String()
),
])
)
headers = []
headers.append(ebsheader('id-1','software-key-here','unique-id'))
它产生以下xml:
<ns0:EBS xmlns:ns0="http://ebs.health.ontario.ca/" Id="id-1">
<SoftwareConformanceKey>software-key-here</SoftwareConformanceKey>
<AuditId>unique-id</AuditId>
</ns0:EBS>
但是,而不是Id="id-1"
我需要它wsu:Id="id-1"
。我需要在标题中指定哪个参数来完成此操作?