I started a script mediator based on BSF in the scratch area: https://svn.apache.org/repos/asf/incubator/synapse/trunk/scratch/ant/BSF/

The basic function works now, there's a simple Synapse config file and associate _javascript_ program demonstrating it which mediates the messages used by the Synapse StockquoteClient sample so it uses the xmethods stockquote service:

https://svn.apache.org/repos/asf/incubator/synapse/trunk/scratch/ant/BSF/repository/conf/sample/synapse_sample_script2.xml
https://svn.apache.org/repos/asf/incubator/synapse/trunk/scratch/ant/BSF/repository/conf/sample/xmethodsStockquote.js

This uses the Synapse registry and stores the script in a property which is different than the _javascript_ mediator which  embeds the script  in a CDATA within the Synapse config XML file. There's an example of theis at: https://svn.apache.org/repos/asf/incubator/synapse/trunk/scratch/ant/BSF/repository/conf/sample/synapse_sample_js.xml .

I think i like the registry/property approach better as the embedded approach gets a bit hard to read. I guess it could support both but maybe that just makes things even more complicated. Does anyone else have a preference either way?

   ...ant

Reply via email to