Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a8343e97c54d3a047c4356139c9b7f69 > files > 80

python-soap-0.12.0-9mdv2010.0.noarch.rpm

#!/usr/bin/env python

# Copyright (c) 2001 actzero, inc. All rights reserved.

ident = '$Id: alanbushTest.py,v 1.5 2003/05/21 14:52:37 warnes Exp $'

import os, re,sys

# add local SOAPpy code to search path
sys.path.insert(1, "..")

from SOAPpy import *
Config.debug=0

# Check for a web proxy definition in environment
try:
   proxy_url=os.environ['http_proxy']
   phost, pport = re.search('http://([^:]+):([0-9]+)', proxy_url).group(1,2)
   proxy = "%s:%s" % (phost, pport)
except:
   proxy = None

SoapEndpointURL	   = 'http://www.alanbushtrust.org.uk/soap/compositions.asp'
MethodNamespaceURI = 'urn:alanbushtrust-org-uk:soap.methods'
SoapAction	   = MethodNamespaceURI + ".GetCategories"

server = SOAPProxy(SoapEndpointURL,
                        namespace=MethodNamespaceURI,
                        soapaction=SoapAction,
                        http_proxy=proxy
                        )

for category in server.GetCategories():
   print category