One of the key benefits of using the generic service interface for the JSDO is that there is not requirement for building an interface class per Business Entity which would be required to be added to the mobile service in an OpenEdge Mobile style project in Progress Developer Studio. With the generic service interface it is only required to add a single interface class and a single catalog class with specific URL mappings to the service definition in a REST style project in Progress Developer Studio. Using an URL mapping which is compatible with the format of URLs which are provided by the JSDO client library this single service interface class can be used to route calls to any business entity.
The generic service consists of two class filter. The class files may have to be added to the AppServer folder in a REST project. These two procedures are:
The Query String parameters numRecords and stopAfter are not used by the JSDO but can optionally be used when requesting JSON data from alternative Controls that do not work with the JSDO (like the Kendo Pivot Grid)
Input Parameter Mapping GET
Output Parameter Mapping GET
Input Parameter Mapping PUT, POST, DELETE
Output Parameter Mapping PUT, POST, DELETE
The Generic Service supports the submit operations of the JSDO.
During the generation of the JSON Catalog responses the Catalog class does use the values RestServiceName and RestServiceAddress to return the endpoint configuration to the JSDO. Those values are determined by the current IConfigurationProvider service instance. When not IConfigurationProvider service instance is currently available, the Catalog class initializes an IConfigurationProvider from the .restapplicationsettings file.