| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
Service
|
|||
| JsonRpcException | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
example:
service = Service()
@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
|
example:
service = Service()
@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
|
example:
service = Service()
@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
|
example:
service = Service()
@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
|
example:
service = Service()
@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
|
example:
service = Service()
@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
|
example:
service = Service()
@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
|
example:
service = Service()
@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
|
example:
service = Service()
@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()
@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() @service.run @service.rss @service.json @service.jsonrpc @service.xmlrpc @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 Wed Dec 14 14:46:06 2011 | http://epydoc.sourceforge.net |