Interface OMElementConvertor

All Known Implementing Classes:
DefaultOMElementConvertor, JSOMElementConvertor, RBOMElementConvertor

public interface OMElementConvertor

The OMElementConvertor interface enables customizing the conversion of XML between Synapse and a script language. Some script languages have their own ways of using XML, such as E4X in JavaScript or REXML in Ruby. But BSF has no support for those so Synapse needs to handle this itself, which is what the OMElementConvertor does. Which OMElementConvertor type to use is discovered based on the file name suffix of the mediator script. The suffix is converted to uppercase and used as the prefix to the OMElementConvertor classname. For example, with a JavaScript script named myscript.js the .js suffix is taken to make the convertor class name "org.apache.synapse.mediators.bsf.convertors.JSOMElementConvertor" If the convertor class is not found then a default convertor is used which converts XML to a String representation.

Method Summary fromScript(Object o)
 void setEngine(org.apache.bsf.BSFEngine e)
 Object toScript( omElement)

Method Detail


void setEngine(org.apache.bsf.BSFEngine e)


Object toScript( omElement)

fromScript fromScript(Object o)

Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.