...
Note |
---|
WSO2 ESB uses Rhino engine to execute JavaScripts. Rhino engine converts the script to a method inside a Java class. TherebyTherefore, when processing large JSON data volumes, the code length must be less than 65536 characters, since the Script mediator converts the payload into a Java object. However, you can use the following alternative options to process large JSON data volumes.
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
<script key="string" language="stringjs" [function="script-function-name"]/> |
...
Code Block | ||||
---|---|---|---|---|
| ||||
<script language="string">js"><![CDATA[...script source code...<script]]><script/> |
...
UI Configuration
Script Type
...
Code Block | ||||
---|---|---|---|---|
| ||||
<script language="js">mc><![CDATA[mc.getPayloadXML()..symbol != "IBM";<script]]><script/> |
The above configuration is an example of an inline mediator using JavaScript/E4X
which returns false if the SOAP message body contains an element named symbol
, which has a value of IBM
.
...