wso2esb - WSO2 ESB - Unable to access properties set in script mediator in a payload mediator -
i've got script mediator i've set value (mc.setproperty("x",1)) , after script mediator i've set payloadfactory mediator i'm trying value x (get-property("x")). used log mediators in between mediation logic check if property value set. value isn't set. i'm using js script mediator.
can try out following? possible wso2 esb 5.0.0
<?xml version="1.0" encoding="utf-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="testproxy" startonload="true" statistics="disable" trace="disable" transports="http,https"> <target> <insequence> <script language="js">mc.setproperty("x", 1);</script> <log level="custom"> <property expression="get-property('x')" name="x"/> </log> <payloadfactory media-type="xml"> <format> <value xmlns="">$1</value> </format> <args> <arg evaluator="xml" expression="get-property('x')"/> </args> </payloadfactory> <respond/> </insequence> </target> <description/> </proxy>
Comments
Post a Comment