Here is the server side Python code for Flash/Flex RMI via pyamf. It starts a simple WSGI server connecting to localhost.
services = {
'someservice': lambda data: data
}
if __name__ == '__main__':
from pyamf.remoting.gateway.wsgi import WSGIGateway
from wsgiref import simple_server
gw = WSGIGateway(services)
httpd = simple_server.WSGIServer(
('localhost', 8000),
simple_server.WSGIRequestHandler,
)
httpd.set_app(gw)
print "Running Hello World AMF gateway on http://localhost:8000"
httpd.serve_forever()
Can't say much about the Java solution. I guess it's less lean ;)