Monday, February 27, 2017

Calling SOAP Web service using requests module of Python 3.6.0

First you need to install request module else you will get following below error inside code when you try to import request module.
No module named 'requests' Python 3.6.0
use below command to install
c:\Test>pip install requests

image1
Use following below code to call SOAP Webservice using WSDL





note:- This is our SOAP Response xml

<!--soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <!--soapenv:Body>
      <!--ns:getKPIResponse xmlns:ns="http://main.siddhu.com">
         <!--ns:return xsi:type="ax21:KPIDo" xmlns:ax21="http://dataobject.siddhu.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <!--ax21:codeReviewCoverage>1<!--/ax21:codeReviewCoverage>
            <!--ax21:testCaseCoverage>1<!--/ax21:testCaseCoverage>
         <!--/ns:return>
      <!--/ns:getKPIResponse>
   <!--/soapenv:Body>
<!--/soapenv:Envelope>

No comments: