使用PYTHON的SOAP API CLIENT

时间:2015-09-15 13:07:47

标签: python web-services soap wsdl suds

我正在尝试使用Python发送此soap请求。但我无法找到有关如何在Python中创建API客户端的任何有用文档,尤其是当标记中包含身份验证时。

使用以下wsdl: https://www.bisgateway.com/brg/services/NRGCompanyReportStandard?wsdl

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:brg="http://www.dnbnordic.com/brg" xmlns:req="http://www.dnbnordic.com/brg/NRGCompanyReportStandard/request">
   <soapenv:Header>
      <brg:customerReference/>
      <brg:deliveryAddress/>
      <brg:userPassword/>
      <brg:userId>yyyy</brg:userId>
      <brg:customerCode>xxxx</brg:customerCode>
      <brg:customerCodeOwner>xxxx</brg:customerCodeOwner>
      <req:language>GB</req:language>
      <req:fromCountry>SE</req:fromCountry>
      <req:toCountry>NO</req:toCountry>
      <req:includeEmptyFields>yes</req:includeEmptyFields>
   </soapenv:Header>
   <soapenv:Body>
      <req:nRGCompanyReportStandardRequest>
         <req:criteria>
            <req:countryRegNumber>937340303</req:countryRegNumber>
         </req:criteria>
      </req:nRGCompanyReportStandardRequest>
   </soapenv:Body>
</soapenv:Envelope>

0 个答案:

没有答案