X-Git-Url: http://git.megacz.com/?p=org.ibex.js.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FXMLRPC.java;h=6db685c2414561dfeac649fafe79a31d7157e6fa;hp=6f50328c181412f56f0e627f3ebfb0800c609b54;hb=19d66e161db458135518efd3539048f44e1e5622;hpb=44ba228826e0d6a6c4ad3ed0072b90e05622ee21 diff --git a/src/org/ibex/js/XMLRPC.java b/src/org/ibex/js/XMLRPC.java index 6f50328..6db685c 100644 --- a/src/org/ibex/js/XMLRPC.java +++ b/src/org/ibex/js/XMLRPC.java @@ -38,8 +38,8 @@ public class XMLRPC extends JS { } public XMLRPC(String url, String method, XMLRPC httpSource) { this.http = httpSource.http; this.url = url; this.method = method; } - public Object get(Object name) { - return new XMLRPC(url, (method.equals("") ? "" : method + ".") + name.toString(), this); } + public JS get(JS name) throws JSExn { + return new XMLRPC(url, (method.equals("") ? "" : method + ".") + JS.toString(name), this); } /** this holds character content as we read it in -- since there is only one per instance, we don't support mixed content */ @@ -84,7 +84,7 @@ public class XMLRPC extends JS { content.reset(); //#switch(c.getLocalName()) case "fault": fault = true; - case "struct": objects.setElementAt(new JS(), objects.size() - 1); + case "struct": objects.setElementAt(new JS.O(), objects.size() - 1); case "array": objects.setElementAt(null, objects.size() - 1); case "value": objects.addElement(""); //#end @@ -129,8 +129,8 @@ public class XMLRPC extends JS { "the server sent a tag which was malformed: " + s); } case "member": - Object memberValue = objects.elementAt(objects.size() - 1); - String memberName = (String)objects.elementAt(objects.size() - 2); + JS memberValue = (JS)objects.elementAt(objects.size() - 1); + JS memberName = (JS)objects.elementAt(objects.size() - 2); JS struct = (JS)objects.elementAt(objects.size() - 3); try { struct.put(memberName, memberValue); @@ -143,7 +143,7 @@ public class XMLRPC extends JS { for(i=objects.size() - 1; objects.elementAt(i) != null; i--); JSArray arr = new JSArray(); try { - for(int j = i + 1; j\n"); JSArray a = (JSArray)o; for(int i=0; i\n"); Enumeration e = j.keys(); while(e.hasMoreElements()) { Object key = e.nextElement(); sb.append(" " + key + "\n"); - appendObject(j.get(key), sb); + appendObject(j.get((JS)key), sb); sb.append(" \n"); } sb.append(" \n"); @@ -302,7 +302,7 @@ public class XMLRPC extends JS { // Call Sequence ////////////////////////////////////////////////////////////////////////// /* FIXME this has been disabled to make XMLRPC usable without Scheduler - public final Object call(Object a0, Object a1, Object a2, Object[] rest, int nargs) throws JSExn { + public final Object call(JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn { JSArray args = new JSArray(); for(int i=0; i