DataLayer.REST - Working with DataLayer.REST
A web service can expose one or more of its methods so that they can be called from an application, resulting in data being returned, as a JSON or XML document in a serialized string.
The web service's Web Application Description Language (WADL) document identifies the available methods. This is the REST equivalent of the SOAP-based web service's WSDL document and provide information about the service's methods, requirements, and data.
DataLayer.REST can be used with one or more child XslTransform elements, which use XSL files to transform the data before it's loaded into the datalayer. This allows the adjustment of data if it has a schema that cannot be understood by the Logi Server engine.
Data may be returned in a hierarchical format, with parent-child relationships, such as JSON data. This data won't be fully available as standard datalayer XML and will create difficulties for further processing and analysis. The Flattener child element can be used to process this hierarchical data into
the standard tabular set of rows and columns normally found in a datalayer.
The following example shows DataLayer.REST in use:
As shown above, a DataLayer.REST element has been added beneath a data table. Its Connection ID and Url Path attributes have been set appropriately. Remember that its Url Path value will be appended to the Connection.REST element's Url Host value.
As shown above, one or more XslTransform elements can be added beneath the datalayer for each XSL transform to be applied to the data before it is retrieved into the datalayer. If a complete file path is not provided for the transform file, the engine will assume that the XSL file is in the _SupportFiles folder.
You may not have access to the web service's WADL file and, therefore, may not know the names of the data columns. In this case, Studio's Add data columns can be a tremendous help. Right-click the data table element, then select the options shown above in the pop-up menus. The wizard will interrogate the web service and insert the elements needed to display your data table columns.