Skip to content

Instantly share code, notes, and snippets.

@SpencerCooley
Created October 21, 2013 19:55
Show Gist options
  • Save SpencerCooley/7089874 to your computer and use it in GitHub Desktop.
Save SpencerCooley/7089874 to your computer and use it in GitHub Desktop.
example of a SOAP api call using SOAPpy
from SOAPpy import WSDL
#The location of our webservice description
WSDLFile = "http://www.webservicex.net/country.asmx?WSDL"
#Object to handle the requests and responses from our
#webservice
proxy = WSDL.Proxy(WSDLFile)
#this should print out the available methods.
print proxy.methods.keys()
#in terminal these are the available methods printed out.
[u'GetCurrencyCodeByCurrencyName', u'GetCurrencyByCountry', u'GetCurrencyCode', u'GetCountries', u'GetCurrencies', u'GetISOCountryCodeByCountyName', u'GetISD', u'GetCountryByCurrencyCode', u'GetGMTbyCountry', u'GetCountryByCountryCode']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment