A fork of https://github.com/Synerty/SOAPpy-py3 This is a working tree till fixes get imported upstream.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

51 lines
1.1 KiB

  1. #!/usr/bin/env python
  2. # Copyright (c) 2001 actzero, inc. All rights reserved.
  3. import sys
  4. sys.path.insert(1, "..")
  5. from SOAPpy import *
  6. from SOAPpy import Parser
  7. # Uncomment to see outgoing HTTP headers and SOAP and incoming
  8. #Config.debug = 1
  9. if len(sys.argv) > 1 and sys.argv[1] == '-s':
  10. server = SOAPProxy("https://localhost:9900")
  11. else:
  12. server = SOAPProxy("http://localhost:9900")
  13. # BIG data:
  14. big = repr('.' * (1<<18) )
  15. # ...in an object
  16. print("server.echo_ino(big):..", end=' ')
  17. tmp = server.echo_ino(big)
  18. print("done")
  19. # ...in an object in an object
  20. print("server.prop.echo2(big)..", end=' ')
  21. tmp = server.prop.echo2(big)
  22. print("done")
  23. # ...with keyword arguments
  24. print('server.echo_wkw(third = big, first = "one", second = "two")..', end=' ')
  25. tmp = server.echo_wkw(third = big, first = "one", second = "two")
  26. print("done")
  27. # ...with a context object
  28. print("server.echo_wc(big)..", end=' ')
  29. tmp = server.echo_wc(big)
  30. print("done")
  31. # ...with a header
  32. hd = headerType(data = {"mystring": "Hello World"})
  33. print("server._hd(hd).echo_wc(big)..", end=' ')
  34. tmp = server._hd(hd).echo_wc(big)
  35. print("done")
  36. server.quit()