Hi, I have a simple tornado server running like this:
import json
import suds
from suds.client import Client
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
url = "http://xx.xxx.xx.xxx/Service.asmx?WSDL"
client = Client(url)
resultCount = client.service.MyMethod()
self.write(json.dumps({'result_count':resultCount}))
application = tornado.web.Application([
(r"/", MainHandler),
])
if __name__ == "__main__":
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(6969)
tornado.ioloop.IOLoop.instance().start()
Now, I have a jquery function that calls this tornado code like this:
$.get("http://localhost:6969",
function(data){
alert(data);
$('#article-counter').empty().append(data).show();
});
For the life of me, I don't understand why data (the response) is blank. Even firebug shows a blank response (the http status is 200 though). Anybody have a clue??