Package helma.scripting.rhino

Examples of helma.scripting.rhino.RhinoCore


        if (method == null) {
            throw new EvaluatorException("Invalid method name");
        }

        RhinoCore core = RhinoCore.getCore();
        Scriptable retval = null;

        try {
            retval = Context.getCurrentContext().newObject(core.getScope());
            XmlRpcClient client = new XmlRpcClient(url);

            int l = args.length;
            Vector v = new Vector();

            for (int i = 0; i < l; i++) {
                Object arg = core.processXmlRpcResponse(args[i]);
                v.addElement(arg);
            }

            Object result = client.execute(method, v);
            // FIXME: Apache XML-RPC 2.0 seems to return Exceptions instead of
            // throwing them.
            if (result instanceof Exception) {
                throw (Exception) result;
            }
            retval.put("result", retval, core.processXmlRpcArgument(result));

        } catch (Exception x) {
            String msg = x.getMessage();

            if ((msg == null) || (msg.length() == 0)) {
View Full Code Here

TOP

Related Classes of helma.scripting.rhino.RhinoCore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.