> ## Content Index
> Fetch the complete content index at: https://blogs.remobjects.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Accessing a Data Abstract Server from Javascript
- URL: https://blogs.remobjects.com/2010/06/17/accessing-a-data-abstract-server-from-javascript/
- Published: 2010-06-17T10:42:12.000Z
- Updated: 2018-08-22T06:17:46.000Z
- Author: Carlo Kok
- Tags: #Import 2026-08-17 20:17

One of the client platforms for Data Abstract that has so far received little attention are JavaScript based web clients.

This morning I wrote a simple JavaScript ([dojo toolkit](dojotoolkit.org/) based) web application that talks to an expanded **PCTrade Sample Server**. It leverages the **JsonMessage** to talk to the server, using JavaScript code for the simple service generated with Service Builder. The Dojo Toolkit btw is a very nice toolkit for writing javascript web applications.

Click on the image to start the video:

[](https://blogs.remobjects.com/wp-content/uploads/2010/06/2010-06-10%5F13301.swf)

## Details

The Data Abstract Server sample contains a custom [ExtendedHttpDispatcher](http://wiki.remobjects.com/wiki/ExtendedHttpDispatcher%5FClass?ref=blogs.remobjects.com) implementation that serves the files in the **javascript/** directory part of the sample, so acts like a regular web server when accessing [**http://127.0.0.1:8099/javascript**](http://127.0.0.1:8099/javascript?ref=blogs.remobjects.com), sending the files as-is, like a regular web server. The index.html file contains the JavaScript code, part of which is created with Service Builder, using the *Tools/CodeGen/JavaScript* menu on the Data Abstract Simple Data Service RODL.

Note that due to JavaScript security, the sample only works when accessing it from the same URL as the service itself.

The service provides 2 methods interesting for this web interface:

- **GetSchema**: Returns the schema as an xml, used to populate the tree view on the left
- **SimpleGetData**: GetData implementation that returns the data in an array of array of string with some Schema information.

The JavaScript application first asks for the schema, and uses XML DOM to find the names of all DataTables and their columns. When clicking a data table it changes the text area to the DA SQL *select* statment for that table. The “Execute Query” button calls the *SimpleGetData* service api, and when the callback for the response occurs, fills the grid with the returned data.