IBM Worklight v5.0.5 > Develop IBM Worklight applications > Develop the server side of an IBM Worklight application

Implement adapter procedures


Implement a procedure in the adapter XML file, using an appropriate signature and any return value.

You have declared a procedure in the adapter XML file, using a <procedure> tag.

Implement the procedure in the adapter JavaScript file. The signature of the JavaScript function that implements the procedure has the following format:

funcName is the name of function which the procedure implements. This name must be the same as the value specified in the name attribute of the<procedure> element in the adapter XML file.

param1 and param2 are the function parameters. The parameters can be scalars (strings, integers, and so on) or objects.

Use the Worklight server-side JavaScript API to...

You can return any value from your function, scalar or object. IBM Worklight uses Rhino as the engine for running the JavaScript script used to implement adapter procedures.


Parent Develop the server side of an IBM Worklight application