Table of Contents maxLevel 3 minLevel 3
Introduction
A data sharing format used often in the Internet is Google Spreadsheet.The WSO2 Data Services Server contains support for Google Spreadsheets as a data source.
Building the sample
The sample data service GSpreadSample should be deployed using the instructions in Samples Setup section.
Running the sample
The sample service can be run using the TryIt tool, which is bundled with the WSO2 Data Services Server, or a code-generated java client sample as discussed in the Data Services Clients section.
...
Table of Contents maxLevel 3 minLevel 3
About the sample
The spreadsheet contains data about the customers of a specific company. The GSpread sample service contains a single operation named named getCustomers which which returns all the customer information that are is stored in the Google spreadsheet. There is also a resource defined as as customers, which can be accessed using the following URL, : "http://localhost:9763/services/GSpreadSample.HTTPEndpoint/customers.
Sample run
Sample run of the service using the TryIt tool is ".
See Data Services and Resources for a definition of data services and operations.
Building the sample
The .dbs file of this sample data service should be manually deployed in your server as explained below.
- Log in to the management console and select Upload under Data Service menu.
- Select the GSpreadSample.dbs file from the
<DSS_HOME>/samples/dbs/gspread/
folder and click Upload. - If the file is deployed successfully, the Deployed Services window appears with the new data service listed. Alternatively, copy the file to the
<DSS_HOME>/repository/deployment/server/dataservices
folder. It will be deployed instantly as hot deployment, which is enabled in Data Services Server by default.
See Creating and Deploying a Configuration File.
Running the sample
The sample service can be run using the TryIt tool, which is bundled with the WSO2 Data Services Server, or a code-generated java client sample as discussed in the Data Services Clients section.
Follow the steps below to demonstrate this functionality using the TryIt tool:
- Log in to the management console of your server and click List under Services in the navigator. The GSpreadSample will be listed here.
- Click Try this service to open the TryIt tool.
- Select the "getCustomers" operation and click Send to execute the request. You will get the customer details in the response as shown below.