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.
 
 
 
 

26 lines
724 B

  1. #!/usr/bin/env python
  2. ident = '$Id: weatherTest.py,v 1.4 2003/05/21 14:52:37 warnes Exp $'
  3. import os, re
  4. import sys
  5. sys.path.insert(1, "..")
  6. from SOAPpy import SOAPProxy
  7. # Check for a web proxy definition in environment
  8. try:
  9. proxy_url=os.environ['http_proxy']
  10. phost, pport = re.search('http://([^:]+):([0-9]+)', proxy_url).group(1,2)
  11. proxy = "%s:%s" % (phost, pport)
  12. except:
  13. proxy = None
  14. SoapEndpointURL = 'http://services.xmethods.net:80/soap/servlet/rpcrouter'
  15. MethodNamespaceURI = 'urn:xmethods-Temperature'
  16. # Do it inline ala SOAP::LITE, also specify the actually ns
  17. server = SOAPProxy(SoapEndpointURL, http_proxy=proxy)
  18. print("inline", server._ns('ns1', MethodNamespaceURI).getTemp(zipcode='94063'))