Xebra Create XML-RPC Webapp
Revision as of 11:00, 1 July 2009 by Fabioz (Talk | contribs) (New page: Category:Xebra * Create a new file ''demo.xrpc'' in the webapp directory . On translation, this will generate a xml-rpc servlet class. <xml> <xrpc:api class="MY_XMLRPC_API" namespace...)
- Create a new file demo.xrpc in the webapp directory . On translation, this will generate a xml-rpc servlet class.
<xrpc:api class="MY_XMLRPC_API" namespace="demo"> <xrpc:method name="sum" /> <xrpc:method name="hello" /> </xrpc:api>
- Now go into estudio and create a new class MY_XMLRPC_API:
class MY_XMLRPC_API feature -- Basic operations hello (a_name: STRING): STRING require a_name_attached: attached a_name not_a_name_is_empty: not a_name.is_empty do Result := "Hello there " + a_name.string end sum (i, j: NATURAL_16): INTEGER -- XML-RPC using Eiffel types. note --options: "xml-rpc" do Result := (i + j).as_integer_32 end end
- Run the server and browse to http://localhost:55000/yourwebapp/demo.xrpc.