如何在Zeep中为操作添加前缀?

2024-10-06 10:59:49 发布

您现在位置:Python中文网/ 问答频道 /正文

需要有关Zeep中格式问题的帮助。Ready API显示正在发送的操作,操作名称前带有前缀“v7”。我如何在Zeep中复制这个

Zeep输出:

<?xml version='1.0' encoding='utf-8'?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v7="http://ads.caiso.com/api/webservices/dispatch/v7">
    <soap-env:Body>
        <getDispatchBatchesSinceUID>
            <batchUID>-1</batchUID>
        </getDispatchBatchesSinceUID>
    </soap-env:Body>
</soap-env:Envelope>

就绪API输出:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v7="http://ads.caiso.com/api/webservices/dispatch/v7">
   <soapenv:Header/>
   <soapenv:Body>
      <v7:getDispatchBatchesSinceUID soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <batchUID xsi:type="xsd:string">?</batchUID>
      </v7:getDispatchBatchesSinceUID>
   </soapenv:Body>
</soapenv:Envelope>

提前谢谢


Tags: orgenvapihttpbodyschemassoapenvelope