Sonic ESB internally uses Rhino as its JavaScript engine.
When calling Java from JavaScript, you should reference the Java classes using Packages
: Packages.javax.xml.transform.TransformerFactory
The reason you can use the java packages without trouble is that Packages.java
has been aliased in the global variable java
.
When you do this, you can use the classes in the javax
package just fine. In fact, you can add any jars you like to the classpath and use those classes too.
https://developer.mozilla.org/en-US/docs/Rhino/Scripting_Java