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.
 
 
 
 

35 lines
959 B

  1. #!/usr/bin/env python
  2. # Copyright (c) 2001 actzero, inc. All rights reserved.
  3. ident = '$Id: alanbushTest.py,v 1.5 2003/05/21 14:52:37 warnes Exp $'
  4. import os, re,sys
  5. # add local SOAPpy code to search path
  6. sys.path.insert(1, "..")
  7. from SOAPpy import *
  8. Config.debug=0
  9. # Check for a web proxy definition in environment
  10. try:
  11. proxy_url=os.environ['http_proxy']
  12. phost, pport = re.search('http://([^:]+):([0-9]+)', proxy_url).group(1,2)
  13. proxy = "%s:%s" % (phost, pport)
  14. except:
  15. proxy = None
  16. SoapEndpointURL = 'http://www.alanbushtrust.org.uk/soap/compositions.asp'
  17. MethodNamespaceURI = 'urn:alanbushtrust-org-uk:soap.methods'
  18. SoapAction = MethodNamespaceURI + ".GetCategories"
  19. server = SOAPProxy(SoapEndpointURL,
  20. namespace=MethodNamespaceURI,
  21. soapaction=SoapAction,
  22. http_proxy=proxy
  23. )
  24. for category in server.GetCategories():
  25. print category