Warm tip: This article is reproduced from serverfault.com, please click

Is it possible to use the $SYSTEM prefix in the <args> section of payloadFactory mediator?

发布于 2020-12-08 13:30:14

I use WSO2 EI v6.5.0. I want to load username and password of an external SOAP service from the system environment variables into a payloadFactory mediator. Is it possible to use the $SYSTEM prefix in the section?

Questioner
Роман А.
Viewed
0
Роман А. 2021-04-12 21:56:46

This script mediator works in my case:

<script description="get cereditorials" language="js">
<![CDATA[mc.setProperty("user", java.lang.System.getenv("ENV_USER"));
         mc.setProperty("pwrd", java.lang.System.getenv("ENV_PWRD"));]]>
</script>