Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
Data Integration Samples
Data Integration Samples
nopaneltrue

RDF is a flexible and extensible way to represent information about web resources.  This sample demonstrates the usage of an RDF file as a data source for data services in WSO2 EI.

About the sample

The RDF file (Movies.rdf), stored in the <EI_HOME>/samples/data-services/resources/ folder contains data about some popular movies. Each movie data has the following sub elements: "title", "director", "year", "genre" and "actor". The sample data service used in this demonstration (RDFSampleService.dbs) contains two operations named getAllMovieData and getMoviesByGenre.  

See Data Services and Resources for a definition of data services and operations.

Building the sample

The sample named RDFSampleService is shipped with WSO2 EI, by default. This .dbs file is stored in the <EI_HOME>/samples/data-services/dbs/rdf/ directory. Follow the steps given below.

  1. Follow the instructions in Uploading a Created Data, to deploy the sample file (RDFSampleService.dbs) in the ESB of WSO2 EI.
  2. Click Services → List on the navigator. The sample should be listed on the services' dashboard.

Executing the sample

The sample service can be run using the TryIt tool, which is bundled with the WSO2 EI, 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:

  1. Log in to the management console of your server and click List under Services in the navigator. The RDFSampleService will be listed here.
  2. Click Try this service to open the TryIt tool.
  3. Select the "getAllMovieData" operation and click Send to execute the request. You will get details on all movies in the response as shown below.

  4. Select the "getMoviesByGenre"operation to retrieve movie information based on the genre provided in the request.