if (result instanceof Exception) { throw (Exception) result; }
    public Object call(Context cx,                             Scriptable scope,                             Scriptable thisObj,                             Object[] args)                      throws EvaluatorException {        if (method == null) {            throw new EvaluatorException("Invalid method name");        }        RhinoEngine engine = (RhinoEngine) cx.getThreadLocal("engine");        RhinoCore c = engine.getCore();        Scriptable retval = null;        try {            retval = Context.getCurrentContext().newObject(c.getScope());            XmlRpcClient client = new XmlRpcClient(url);            // long now = System.currentTimeMillis ();            int l = args.length;            Vector v = new Vector();            for (int i = 0; i < l; i++) {                Object arg = c.processXmlRpcResponse(args[i]);                v.addElement(arg);            }            Object result = client.execute(method, v);            retval.put("result", retval, c.processXmlRpcArgument(result));        } catch (Exception x) {            String msg = x.getMessage();            if ((msg == null) || (msg.length() == 0)) {                msg = x.toString();            }            retval.put("error", retval, msg);        }        return retval;    }