From f025bde8f77969b6e0d1aced7a3ef333a600e64e Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 3 Sep 2004 00:44:12 +0000 Subject: [PATCH] removed dependencies on the core darcs-hash:20040903004412-5007d-24e9eb757bf3c94917a8499eb7556b93793a048a.gz --- src/org/ibex/net/SOAP.java | 10 +++++----- src/org/ibex/net/XMLRPC.java | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/org/ibex/net/SOAP.java b/src/org/ibex/net/SOAP.java index 85670a3..b33bfb6 100644 --- a/src/org/ibex/net/SOAP.java +++ b/src/org/ibex/net/SOAP.java @@ -90,7 +90,7 @@ public class SOAP extends XMLRPC { } else if (me instanceof byte[]) { objects.removeElementAt(objects.size() - 1); - objects.addElement(new Stream.ByteArray(Base64.decode(new String(content.getBuf(), 0, content.size())), null)); + objects.addElement(new Fountain.ByteArray(Base64.decode(new String(content.getBuf(), 0, content.size())), null)); content.reset(); } else if (me instanceof Integer) { @@ -179,10 +179,10 @@ public class SOAP extends XMLRPC { sb.append(((Boolean)o).booleanValue() ? "true" : "false"); sb.append("\r\n"); - } else if (o instanceof Stream) { + } else if (o instanceof Fountain) { try { sb.append(" <" + name + " xsi:type=\"SOAP-ENC:base64\">\r\n"); - InputStream is = ((Stream)o).getInputStream(); + InputStream is = ((Fountain)o).getInputStream(); byte[] buf = new byte[54]; while(true) { int numread = is.read(buf, 0, 54); @@ -199,9 +199,9 @@ public class SOAP extends XMLRPC { sb.append(((Boolean)o).booleanValue() ? "1" : "0"); sb.append("\r\n"); } catch (IOException e) { - if (Log.on) Log.info(this, "caught IOException while attempting to send a ByteStream via SOAP"); + if (Log.on) Log.info(this, "caught IOException while attempting to send a Fountain via SOAP"); if (Log.on) Log.info(this, e); - throw new JSExn("caught IOException while attempting to send a ByteStream via SOAP"); + throw new JSExn("caught IOException while attempting to send a Fountain via SOAP"); } } else if (o instanceof String) { diff --git a/src/org/ibex/net/XMLRPC.java b/src/org/ibex/net/XMLRPC.java index 14aacb5..984d485 100644 --- a/src/org/ibex/net/XMLRPC.java +++ b/src/org/ibex/net/XMLRPC.java @@ -98,7 +98,7 @@ public class XMLRPC extends JS { case "string": objects.setElementAt(new String(content.getBuf(), 0, content.size()), objects.size() - 1); case "double": objects.setElementAt(new Double(new String(content.getBuf(), 0, content.size())), objects.size() - 1); case "base64": - objects.setElementAt(new Stream.ByteArray(Base64.decode(new String(content.getBuf(), 0, content.size())), + objects.setElementAt(new Fountain.ByteArray(Base64.decode(new String(content.getBuf(), 0, content.size())), null), objects.size() - 1); case "name": objects.addElement(new String(content.getBuf(), 0, content.size())); case "value": if ("".equals(objects.lastElement())) @@ -207,10 +207,10 @@ public class XMLRPC extends JS { sb.append(((Boolean)o).booleanValue() ? "1" : "0"); sb.append("\n"); - } else if (o instanceof Stream) { + } else if (o instanceof Fountain) { try { sb.append(" \n"); - InputStream is = ((Stream)o).getInputStream(); + InputStream is = ((Fountain)o).getInputStream(); byte[] buf = new byte[54]; while(true) { int numread = is.read(buf, 0, 54); @@ -226,9 +226,9 @@ public class XMLRPC extends JS { } sb.append("\n \n"); } catch (IOException e) { - if (Log.on) Log.info(this, "caught IOException while attempting to send a ByteStream via XML-RPC"); + if (Log.on) Log.info(this, "caught IOException while attempting to send a Fountain via XML-RPC"); if (Log.on) Log.info(this, e); - throw new JSExn("caught IOException while attempting to send a ByteStream via XML-RPC"); + throw new JSExn("caught IOException while attempting to send a Fountain via XML-RPC"); } } else if (o instanceof String) { @@ -301,6 +301,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 { JSArray args = new JSArray(); for(int i=0; i