[Download] | [Documentation Home] | [Release Note]

Data Services Clients Sample

Introduction

This sample demonstrates the usage of code-generated clients when used with data-services. The service stubs are created by using the "WSDL2Java" tool, which are used by the data service clients.

Prerequisites

The sample data services should be deployed as per the instructions mentioned in Deploying Samples section.

Running the Clients

There are separate ant tasks for all the samples. The ant tasks are as follows.

  • rdbms - This represents simple RDBMS data source based data service client.
  • csv - This represents a CSV data source based data service client.
  • excel - This represents a Excel data source based data service client.
  • gspread - This represents a Google Spreadsheet data source based data service client.
  • batch_request - This represents a data service client, which executes a batch request in a data service.
  • secure_sample - This 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 - This 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.
Follow the below instructions to run the clients :-
  1. Switch to data service clients sample directory, e.g.
    # cd CARBON_HOME/samples/clients
  2. Running all the generic clients (rdbms, csv, excel, gspread, batch_request)
    # ant
  3. Running the secure sample sample client
    # ant secure_sample
  4. Running the file service application sample client
    # ant file_service_app
NOTE: any of the samples can be run individually by running the "ant" command followed by the task name, e.g. "ant rdbms", for an explanation of the output for each service, refer to its respective sample pages.