<span style= "font-family:arial, Helvetica, Sans-serif; Background-color:rgb (255, 255, 255); " > Now the most popular is suds, but there are still a lot of bugs are not fixed. It seems that no one has updated the </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 execution, 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 not say common, but I met the first time with runtimeerror:maximum recursion depth exceeded
It means recursion is too deep, and Python's default recursion depth is 1000.
You can change the depth value, but it doesn't help.
Import Sys
Sys.setrecursionlimit (1500)
Finally, just a good tool change. I used the soapy,soappy,pysimplesoap,soaplib.
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)
Among them Exactcheckjson is the service provided by WebService
And the parameters must be in this form, assuming that the direct reference, it will be reported ypeerror:not supporting soapenc:arrays or xsd:list error
Then my request and cred are provided as an excuse document. Still can't change ~
Python Interview WebService