This documentation is for WSO2 Data Services Server 3.2.2. View documentation for the latest release.
Samples Setup - Data Services Server 3.2.2 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

To get started on the DSS samples, you are required to have the following set up in your product server:


Step 1: Deploy the sample data services

In order to run a particular sample, the configuration files (.dbs) relevant to that data service should be deployed in the server. Also, if a data service contains a services.xml file, it should also be deployed along with the .dbs file. Follow the steps given below to deploy the configuration files and the services.xml files (if applicable) of all the samples that are in the <DSS_HOME>/Samples/ directory.

  1. Stop any Data Services Server instances that are running. This is recommended in order to clean the current sample database and to redeploy the services.
  2. To clean the current sample database by removing the existing sample data services:
    1. Open the command prompt and go to the <DSS_HOME>/samples directory.
    2. Execute the ant clean command.

      cd <DSS_HOME>/samples
      ant clean 
  3. To redeploy all samples: 
    1. Go to the <DSS_HOME>/samples directory in the command prompt.
    2. Execute the ant command. 


Step 2: Start the data service clients

There are separate code-generated clients for all the sample data services, which should be started before we run the sample. If you have deployed the samples in your server as explained above, you can now start the clients using the relevant ant command as explained below:

  1. Open the command prompt and go the <DSS_HOME>/samples/clients/ directory.
  2. You can either run all the generic clients simultaneously or start an individual client.
    • To start all the generic clients (e.g. rdbms, csv, excel, gspread, batch_request), run the ant command as shown below:

      cd <DSS_HOME>/samples/clients


    • To start a specific sample client, run the ant command with the client name. For example, to start the secure_sample client, run the following command:

      cd <DSS_HOME>/samples/clients
      ant secure_sample

      Listed below are the separate ant commands for each data service client.

      • rdbms - RDBMS data source based data service clients.
      • csv - CSV data source based data service client.
      • excel - Excel data source based data service client.
      • gspread - Google Spreadsheet data source based data service client.
      • batch_request - Represents a data service client which executes a batch request in a data service.
      • secure_sample - Represents a data service client where a security enabled data service is called. The data service security is enabled manually by the usage of a "services.xml" file in conjunction with the data service.
      • file_service_app - Represents a standalone Java application which uses REST style invocations to transfer binary data. This also demonstrates the usage of streaming data, where a file of any size can be uploaded or downloaded using the application.

Step 3: Start the server

If you have deployed the samples in the server and started the relevant clients, start the server as explained below.

  1. Go to the <DSS_HOME>/bin directory in the command prompt.
  2. Start the server by executing the command relevant to the OS as shown below.

    For Windows OS:

    cd <DSS_HOME>/bin

    For Linux OS:

    cd <DSS_HOME>/bin
  • No labels