2003/06/12 17:57:37
[org.ibex.core.git] / src / org / xwt / XMLRPC.java
index f2e8eee..ce1fab2 100644 (file)
@@ -30,7 +30,7 @@ import org.bouncycastle.util.encoders.Base64;
  *         convert.
  *  </ol>
  */
-class XMLRPC extends JS.Function {
+class XMLRPC extends JS.Callable {
 
     public Object[] keys() { throw new Error("not implemented"); }
 
@@ -151,7 +151,7 @@ class XMLRPC extends JS.Function {
            } else if (c.localName.equals("data")) {
                int i;
                for(i=objects.size() - 1; objects.elementAt(i) != null; i--);
-               JS.Array arr = new JS.Array();
+               Array arr = new Array();
                for(int j = i + 1; j<objects.size(); j++) arr.put(new Integer(j - i - 1), objects.elementAt(j));
                objects.setElementAt(arr, i);
                objects.setSize(i + 1);
@@ -263,11 +263,11 @@ class XMLRPC extends JS.Function {
             sb.append("</dateTime.iso8601></value>\n");
            */
 
-        } else if (o instanceof JS.Array) {
+        } else if (o instanceof Array) {
             if (tracker.get(o) != null) throw new JS.Exn("attempted to send multi-ref data structure via XML-RPC");
             tracker.put(o, Boolean.TRUE);
             sb.append("                <value><array><data>\n");
-            JS.Array a = (JS.Array)o;
+            Array a = (Array)o;
             for(int i=0; i<a.length(); i++) appendObject(a.elementAt(i), sb);
             sb.append("                </data></array></value>\n");
 
@@ -292,7 +292,7 @@ class XMLRPC extends JS.Function {
 
     // this is synchronized in case multiple threads try to make a call on the same object... in the future, change this
     // behavior to use pipelining.
-    public synchronized Object call2(JS.Array args) throws JS.Exn, IOException {
+    public synchronized Object call2(Array args) throws JS.Exn, IOException {
         if (Log.verbose) Log.log(this, "call to " + url + " : " + methodname);
 
         if (tracker == null) tracker = new Hash();
@@ -333,7 +333,7 @@ class XMLRPC extends JS.Function {
         }
     }
 
-    protected String send(JS.Array args, HTTP http) throws JS.Exn, IOException {
+    protected String send(Array args, HTTP http) throws JS.Exn, IOException {
         StringBuffer content = new StringBuffer();
         content.append("\r\n");
         content.append("<?xml version=\"1.0\"?>\n");
@@ -366,7 +366,7 @@ class XMLRPC extends JS.Function {
         return objects.elementAt(0);
     }
 
-    public final Object _call(JS.Array args) throws JS.Exn {
+    public final Object call(Array args) throws JS.Exn {
 
         if (!ThreadMessage.suspendThread()) return null;
 
@@ -395,7 +395,6 @@ class XMLRPC extends JS.Function {
     }
 
     public XMLRPC(String url, String methodname, HTTP http) {
-       super(-1, "java", null, null);
         this.http = http;
         this.url = url;
         this.methodname = methodname;