A few client-side implementations are given here, in different languages.
The called api is config/get on an api controller mounted on ‘/api’, and the server is supposed to be listening on http://127.0.0.1:8080/.
The actual controller implementation would look like this:
class ConfigController(WebServicesController):
@wsexpose(str)
@wsvalidate(str)
@require(not_anonymous())
def get(self, varname):
'''
Returns a value from the configuration
:param varname: The value name
'''
try:
return turbogears.config.get(varname)
except:
return None
A few REST+XML or REST+JSON client-side implementations are given here.
The calls are done on http://127.0.0.1:8080/api/config/get.
Note that these examples are adapted from working examples but have not been tested themselves.
Todo
Create a sample project with a fully functionnal server and usable client examples.
The wsdl file that describe the api is available at the following URL: http://127.0.0.1:8080/api/api.wsdl.
From this file any decent SOAP framework should give you access to your server API.