我正在尝试创建XML文件并将SOAP请求发送到端点。我怎么能用Python做到这一点。我的最终XML SOAP请求应如下所示(一个小样本,而不是完整的xml):
<Header/>
<Body>
<CalculateSupplierQuote>
<!--1 to 500 repetitions:-->
<SupplierQuote>
<local_circuittype>Existing circuit</local_circuittype>
<local_businessOpportunity>Access to Orange Business Services Network</local_businessOpportunity>
<local_accessType>Upgrade/downgrade of full path diversity</local_accessType>
<!--Optional:-->
<local_configurationSite>single</local_configurationSite>
<currencyCode>USD</currencyCode>
<!--Optional:-->
<projectName>test</projectName>
<!--Optional:-->
<asynchronousPPUrl/>
<!--Optional:-->
<local_region/>
<requester>
我的起始XML文件是:
header("Content-type:text/octect-stream");
header("Content-Disposition:attachment;filename=".date('Y-m-d',time())."_search_results.csv");
echo $searchResults_xml_response;
unset($searchResults_xml_response);
是否有用于此任务的python库,或者我需要使用LXML或Elementree并使用命名空间创建XML?请帮忙!