Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:
repository/samples/directory that includes all Data Integration samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Data Integration samples is changed to
Microsoft Excel is one of the most popular spreadsheet formats. An Excel sheet can be used as a datasource for creating data services in WSO2 Enterprise Integrator (WSO2 EI).
About the sample
Products.xls file, stored in the
<EI_HOME>/samples/data-services/resources/ folder, is used as the datasource to demonstrate this sample data service. This datasource contains details of the products manufactured in an automobile company. Products refer to cars/motorocyles. The data table has the following columns: "ID", "Name", "Classification" and "Price" (same as in the CSV Sample). This sample data service contains two operations:
- getProducts: Lists all the products that are manufactured by the company. Each record in the result will contain "ID" and "Name" fields.
- getProductClassifications: Lists all the products along with the classifications. The result is presented with two records: "Name" and "classification".
See Data integration for a definition of data services and operations.
Building the sample
The sample data service named
ExcelSampleService should be deployed using the instructions in Samples Setup.
Running the sample
The sample service can be run using the tool, which is bundled with WSO2 EI, or a code-generated java client sample as described in .
Follow the steps below to test this functionality using the TryIt tool:
- Log in to the management console of your server and click List under Services in the navigator. The data service named
ExcelSampleServicewill be listed.
- Click Try this service to open the TryIt tool.
- Select the "getProducts" operation and click Send to execute the operation. You will get a product list in the response as shown below.