Skip to content

Instantly share code, notes, and snippets.

@rmetzler
Created July 17, 2009 16:10
Show Gist options
  • Save rmetzler/149130 to your computer and use it in GitHub Desktop.
Save rmetzler/149130 to your computer and use it in GitHub Desktop.
A simple client for the fortune SOAP webservice using Python & ZSI
#
# A simple client for the fortune SOAP webservice using ZSI
#
# this is how you create the stubs and client / server classes:
#
# wsdl2py http://www.doughughes.net/WebServices/fortune/fortune.cfc?wsdl
#
#
import fortune_client
loc = fortune_client.fortuneLocator()
fc = loc.getfortune_cfc()
fc.binding.trace = open('trace.log', 'w')
req = fortune_client.getFortuneRequest(topics='drugs, simpsonshomer')
resp = fc.getFortune(req)
print resp._getFortuneReturn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment