...
This section describes how When using data services, the user may come across the need to transform the result as they wish. This is handled in WSO2 Data Services Server samples are deployed before running and testing them.
Deploying the Service
To build the samples you need Apache Ant build tool.
1. Install the WSO2 Application Server. See Application Server Installation for instructions.
2. In a command prompt, switch to the Chad directory.
For example, cd <AS_HOME>\samples\Chad
3. From there, type ant.
4. Run the WSO2 Application Server start script. See Application Server Management Console for instructions.
5. Check the WSO2 Application Server instance using this URL: https://localhost:9443/carbon.
6. You now have the Chad service deployed on WSO2 Application Server. If you go to "Deployed Services" in the Application Serve Management Console, you will see the "Chad" service deployed.
using XSLT Transformation, where the user can define the transformation in xslt and provide the url of the transformation file in the result element.
The sample data service ExcelSampleService should be deployed using the instructions in Deploying Data Services 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.
Service Description
The Excel sample data service contains two operations "getProducts" to list all the products that are manufactured in the company, each result record will contain "ID" and "Name" fields. And "getProductClassifications" where to list all the products along with the classifications, which contains two result records which are "Name" and "classification".
Second operation's ("getProductClassifications") actual output has changed as "product-Name" and "product-classification" by using the xslt transformation.
Sample Run
Sample run of the service using the TryIt tool is shown below.