2016-06-22 142 views
0

我需要一个像这样的输出Spyne:Python的Spyne自定义输出参数

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <soapenv:Body> 
     <getActiveServicesResponse xmlns="http://mci.tajmi.ir/"> 
      <getActiveServicesReturn>12345:2030:hafez poem:hafez </getActiveServicesReturn> 
      <getActiveServicesReturn>12346:2031:شعر طنز:tanz </getActiveServicesReturn> 
      <getActiveServicesReturn>bardari123:203861:سرویس بارداري :bar 
</getActiveServicesReturn> 
     </getActiveServicesResponse> 
    </soapenv:Body> 
</soapenv:Envelope> 

什么我可以生成被

<?xml version='1.0' encoding='UTF-8'?> 
<soap11env:Envelope xmlns:soap11env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://mci.tajmi.ir/"> 
    <soap11env:Body> 
     <tns:getActiveServicesResponse> 
      <tns:getActiveServicesReturn> 
       <tns:string>12345:2030:hafez poem:hafez</tns:string> 
       <tns:string>12346:2031:شعر طنز:tanz </tns:string> 
       .... 
      </tns:getActiveServicesReturn> 
     </tns:getActiveServicesResponse> 
    </soap11env:Body> 
</soap11env:Envelope> 

我如何自定义输出?我尝试了复杂的方法但没有成功

+0

请添加您的spyne代码以及 –

回答