Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- from suds.client import Client
- import logging
- logging.basicConfig(level=logging.INFO)
- logging.getLogger('suds.client').setLevel(logging.DEBUG)
- logging.getLogger('suds.transport').setLevel(logging.DEBUG)
- logging.getLogger('suds.xsd.schema').setLevel(logging.DEBUG)
- logging.getLogger('suds.wsdl').setLevel(logging.DEBUG)
- client = Client('http://localhost:8087/calculator/soap/description')
- #result = client.service.add_many([1, 2, 3, 4, 5])
- #print "add_many:", result
- a = client.factory.create('Complex')
- a.r = 1
- a.i = 0
- b = client.factory.create('Complex')
- b.r = 0
- b.i = 1
- client.set_options(retxml=True)
- if False:
- try:
- res_comp = client.service.add_complex(a, b)
- except BaseException as x:
- print x
- print "got smth"
- res_comp = client.service.add_complex({'r':1, 'i':0}, {'r':0, 'i':1})
- print res_comp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement