* convert.
* </ol>
*/
-class XMLRPC extends JS.Function {
+class XMLRPC extends JS.Callable {
public Object[] keys() { throw new Error("not implemented"); }
} 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);
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");
// 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();
}
}
- 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");
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;
}
public XMLRPC(String url, String methodname, HTTP http) {
- super(-1, "java", null, null);
this.http = http;
this.url = url;
this.methodname = methodname;