<span style= "font-family:arial, Helvetica, Sans-serif; Background-color:rgb (255, 255, 255); " > Now the most popular is suds, but there are still many bugs are not fixed, as if no one updated </span>
Import sysfrom suds.client Import clientsys.setrecursionlimit ($) Test_url = ' http://webservices.amazon.com/ awsecommerceservice/awsecommerceservice.wsdl ' url = ' http://localhost/IdentifierService.svc?wsdl ' client = Client ( URL, Cache=none)
Suds is really easy to use
But there were errors after the run, and the other WSDL addresses were fine.
Google also found that suds and the. NET platform seem a little incompatible
And this WSDL is the. NET platform, the evil. Net
Can't say common, but I met runtimeerror:maximum recursion depth exceeded the first time I used it.
It means recursion is too deep, and Python's default recursion depth is 1000.
You can modify the depth value, but it doesn't help.
Import Sys
Sys.setrecursionlimit (1500)
Finally had to change the tool, with the soapy,soappy,pysimplesoap,soaplib really quickly use it again
Finally, only Zsi is available
From ZSI import serviceproxyurl = ' http://localhost/IdentifierService.svc?wsdl ' proxy = serviceproxy.serviceproxy (URL) #是两个ServiceProxyperson = "{ ' IDNumber ': ' 4123412412423 ', ' Name ': ' Zhang San '} ' account = ' { ' UserName ': ' admin ', ' Password ': ' 123456 '} "response = Proxy. Exactcheckbyjson (Request=person, Cred=account)
Where Exactcheckjson is the service provided by WebService
and the parameter must be this form, if directly on the parameter, will be reported ypeerror:not supporting soapenc:arrays or xsd:list error
Then my request with cred is an excuse for the document provided, and not change ~
Python Access WebService