[pyamf-users] Using WebAppGateway with GAE instead of WSGIGateway
Harris Reynolds
harris at nimblelabs.com
Sun Jul 20 22:23:34 CEST 2008
Below is the answer to my own question. FYI for those who don't know, using
the WebAppGateway allows a GAE application to handle AMF requests on one URL
and other standard HTTP requests on another URL.
~harris
import wsgiref.handlers
from google.appengine.ext import webapp
from pyamf.remoting.gateway.google import WebAppGateway
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, webapp World!')
def echo(data):
return data
services = {
'myservice.echo': echo,
}
def main():
application_paths = [('/services', WebAppGateway(services)), ('/',
MainPage)]
application = webapp.WSGIApplication( application_paths, debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == "__main__":
main()
On Sun, Jul 20, 2008 at 3:10 PM, Harris Reynolds <harris at nimblelabs.com>
wrote:
> Hey there. I have PyAMF up and running using RemoteObject through Google
> App Engine. This is great stuff!! ... thanks for the good work.
>
> Quick question... I'd like to use the WebAppGateway class that integrates
> with the GAE webapp framework (instead of the WSGIGateway class)...
> however... I do not see how to get my services mapped into the
> WebAppGateway class. With the WSGIGateway I simply add the services hash
> table to the constructor... how is this done using the WebAppGateway?
>
> thanks for any pointers,
>
> ~harris
>
--
/**************************************************
* Harris Reynolds
* Flex/RIA Architect
* cell (205) 746-5698
* http://nimblelabs.com/
* "Simplifying Software Development"
**************************************************/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pyamf.org/pipermail/users/attachments/20080720/4f245fe8/attachment.htm
More information about the users
mailing list