org.apache.axis2.scripting.convertors
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 |
org.apache.axiom.om.OMElement |
fromScript(java.lang.Object o)
|
void |
setEngine(org.apache.bsf.BSFEngine e)
|
java.lang.Object |
toScript(org.apache.axiom.om.OMElement omElement)
|
setEngine
void setEngine(org.apache.bsf.BSFEngine e)
toScript
java.lang.Object toScript(org.apache.axiom.om.OMElement omElement)
fromScript
org.apache.axiom.om.OMElement fromScript(java.lang.Object o)
Copyright © 2007 Apache Web Services Project. All Rights Reserved.