Created
October 21, 2013 19:55
-
-
Save SpencerCooley/7089874 to your computer and use it in GitHub Desktop.
example of a SOAP api call using SOAPpy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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