This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
XSLT Transformation Sample
XSLT transformation is used in WSO2 Enterprise Integrator (WSO2 EI) to transform the result of an already defined operation into a different result. The user can define the transformation xslt and provide the url of the transformation file in the result element.
About the sample
The sample data service (ExcelSampleService), which we use for this demonstration consists of two operations:
- getProducts - Lists all the products that are manufactured in the company. Each record in the result contains "ID" and "Name" fields.Â
- getProductClassifications - Lists all the products along with the classifications. The result will consist of two records, "Name" and "classification". However, note that because of the xslt transformation, the actual output of this operation has changed to "product-Name" and "product-classification".Â
See About Data Services and Resources 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 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:
- Log in to the management console of your server and click List under Services in the navigator. The ExcelSampleService will be listed here.
- Click Try this service to open the TryIt tool.
- Select "getProductClassifications" operation and click Send to execute. You will get the response as shown below.
Â