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/.

Using Scripts in Mediation (Script Mediator)

Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation :

  • <PRODUCT_HOME>/ repository/samples/ directory that includes all Integration profile samplesĀ is changed to <EI_HOME>/ samples/service-bus/.
  • <PRODUCT_HOME>/ repository/samples/resources/ directory that includes all artifacts related to the Integration profile samples is changed to <EI_HOME>/ samples/service-bus/resources/.

The following samples demonstrate how to use the Script mediator:

See also Sample 441: Converting JSON to XML Using JavaScript.

For tips and best practices for using JavaScript, see http://jstherightway.org/.