Python Interview WebService

Source: Internet
Author: User

<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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.