Home | Trees | Indices | Help |
|
---|
|
object --+ | Service
|
|||
JsonRpcException |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
|
service = Service(globals()) @service.run def myfunction(a, b): return a + b def call(): return service()Then call it with: wget http://..../app/default/call/run/myfunction?a=3&b=4 |
service = Service(globals()) @service.csv def myfunction(a, b): return a + b def call(): return service()Then call it with: wget http://..../app/default/call/csv/myfunction?a=3&b=4 |
service = Service(globals()) @service.xml def myfunction(a, b): return a + b def call(): return service()Then call it with: wget http://..../app/default/call/xml/myfunction?a=3&b=4 |
service = Service(globals()) @service.rss def myfunction(): return dict(title=..., link=..., description=..., created_on=..., entries=[dict(title=..., link=..., description=..., created_on=...]) def call(): return service()Then call it with: wget http://..../app/default/call/rss/myfunction |
service = Service(globals()) @service.json def myfunction(a, b): return [{a: b}] def call(): return service()Then call it with: wget http://..../app/default/call/json/myfunction?a=hello&b=world |
service = Service(globals()) @service.jsonrpc def myfunction(a, b): return a + b def call(): return service()Then call it with: wget http://..../app/default/call/jsonrpc/myfunction?a=hello&b=world |
service = Service(globals()) @service.xmlrpc def myfunction(a, b): return a + b def call(): return service()The call it with: wget http://..../app/default/call/xmlrpc/myfunction?a=hello&b=world |
service = Service(globals()) @service.amfrpc def myfunction(a, b): return a + b def call(): return service()The call it with: wget http://..../app/default/call/amfrpc/myfunction?a=hello&b=world |
service = Service(globals()) @service.amfrpc3('domain') def myfunction(a, b): return a + b def call(): return service()The call it with: wget http://..../app/default/call/amfrpc3/myfunction?a=hello&b=world |
example:: service = Service(globals()) @service.soap('MyFunction',returns={'result':int},args={'a':int,'b':int,}) def myfunction(a, b): return a + b def call(): return service() The call it with:: from gluon.contrib.pysimplesoap.client import SoapClient client = SoapClient(wsdl="http://..../app/default/call/soap?WSDL") response = client.MyFunction(a=1,b=2) return response['result'] Exposes online generated documentation and xml example messages at: - http://..../app/default/call/soap |
register services with: service = Service(globals()) @service.run @service.rss @service.json @service.jsonrpc @service.xmlrpc @service.jsonrpc @service.amfrpc @service.amfrpc3('domain') @service.soap('Method', returns={'Result':int}, args={'a':int,'b':int,}) expose services with def call(): return service() call services with http://..../app/default/call/run?[parameters] http://..../app/default/call/rss?[parameters] http://..../app/default/call/json?[parameters] http://..../app/default/call/jsonrpc http://..../app/default/call/xmlrpc http://..../app/default/call/amfrpc http://..../app/default/call/amfrpc3 http://..../app/default/call/soap |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Thu Aug 4 00:47:02 2011 | http://epydoc.sourceforge.net |