# # JSON-RPC demo client contributed by Christoph Zwerschke # from ExamplePage import ExamplePage class JSONRPCClient(ExamplePage): """Demo client for using the JSON-RPC example.""" def writeJavaScript(self): ExamplePage.writeJavaScript(self) self.write('''\ ''') def writeContent(self): self.write('''\

JSON-RPC Example

This example shows how you can call methods of a JSON-RPC servlet built with Webware for Python from your web browser via JavaScript (which has to be activated to run this demo).

The example uses a JSON-RPC JavaScript client based on Jan-Klaas' "JavaScript o lait" library (jsolait). You can also use other JavaScript libraries and toolkits such as dojo or pyjamas for that purpose.

Type in any example text to be used as input parameter, choose one of the available methods to be invoked by the example servlet and press the button to display the result.

Input parameter Remote method Result
''')