Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation :
repository/samples/directory that includes all Integration profile samples is changed to
repository/samples/resources/directory that includes all artifacts related to the Integration profile samples is changed to
Objective: Demonstrate how to use scripts in mediation using the Script mediator
The ESB Script Mediator is a ESB extension, and thus all prerequisites are not bundled by default with the ESB distribution. Before you use some scripts, you may need to manually add the required JAR files to the ESB
lib directory, and optionally perform other installation tasks as may be required by the individual scripting language. This is explained in the Samples Setup guide.
- Start the Synapse configuration numbered 350: i.e.
wso2esb-samples.sh -sn 350
- Start the Axis2 server and deploy the
SimpleStockQuoteServiceif not already done.
stockquoteTransform.jsis as follows:
For additional examples, see Using Scripts in Mediation (Script Mediator).