I am doing some very simple script mediation as a test to see if I can change the payload being returned by my server.
My unmediated payload comes out as:
{"origin":"202.37.75.130"}
Then I try doing a very simple check to see whether get and set work for payloads:
<script language="js">
var older = mc.getPayloadJSON();
var newer=older;
mc.setPayloadJSON(newer);
</script>
My result from this is:
{"jsonObject":""}
I have done testing that shows that setPayloadJSON() works, which means that my getPayloadJSON must be returning an empty object.
Looking at the log file shows this:
ERROR {org.apache.synapse.mediators.bsf.ScriptMessageContext} - JSON object is null. {org.apache.synapse.mediators.bsf.ScriptMessageContext}
Is there anyone else having this error?