Skip to content

Instantly share code, notes, and snippets.

@cjgiridhar
Created September 6, 2012 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjgiridhar/3652325 to your computer and use it in GitHub Desktop.
Save cjgiridhar/3652325 to your computer and use it in GitHub Desktop.
Tornado - SOAP Web Service
import tornado.httpserver
import tornado.ioloop
from tornadows import soaphandler
from tornadows import webservices
from tornadows import xmltypes
from tornadows.soaphandler import webservice
class MathService(soaphandler.SoapHandler):
@webservice(_params=[int,int],_returns=int)
def add(self, a, b):
return a+b
if __name__ == '__main__':
service = [('MathService',MathService)]
ws = webservices.WebService(service)
application = tornado.httpserver.HTTPServer(ws)
application.listen(8080)
tornado.ioloop.IOLoop.instance().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment