-// Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL]
+// Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
package org.xwt;
import java.io.*;
} else if (value.endsWith("null")) {
objects.removeElementAt(objects.size() - 1);
objects.addElement(null);
- } else if (value.endsWith("arrayType") || value.endsWith("Array") || key.endsWith("arrayType")) {
+ } else if (value.endsWith("arrayType") || value.endsWith("JS.Array") || key.endsWith("arrayType")) {
objects.removeElementAt(objects.size() - 1);
- objects.addElement(new Array());
+ objects.addElement(new JS.Array());
}
}
}
objects.addElement(new String(content.getBuf(), 0, content.size()).intern());
content.reset();
+ // FIXME
+ /*
} else if (me instanceof byte[]) {
objects.removeElementAt(objects.size() - 1);
objects.addElement(new ByteStream(Base64.decode(new String(content.getBuf(), 0, content.size()))));
content.reset();
-
+ */
} else if (me instanceof Integer) {
objects.removeElementAt(objects.size() - 1);
objects.addElement(new Integer(new String(content.getBuf(), 0, content.size())));
if (objects.size() < 2) return;
// our parent "should" be an aggregate type -- add ourselves to it.
- if (parent != null && parent instanceof Array) {
+ if (parent != null && parent instanceof JS.Array) {
objects.removeElementAt(objects.size() - 1);
- ((Array)parent).addElement(me);
+ ((JS.Array)parent).addElement(me);
} else if (parent != null && parent instanceof JS) {
objects.removeElementAt(objects.size() - 1);
sb.append(((Boolean)o).booleanValue() ? "true" : "false");
sb.append("</" + name + ">\r\n");
+ /* FIXME
} else if (o instanceof ByteStream) {
try {
sb.append(" <" + name + " xsi:type=\"SOAP-ENC:base64\">\r\n");
if (Log.on) Log.log(this, e);
throw new JS.Exn("caught IOException while attempting to send a ByteStream via SOAP");
}
-
+ */
} else if (o instanceof String) {
sb.append(" <" + name + " xsi:type=\"xsd:string\">");
String s = (String)o;
}
sb.append("</" + name + ">\r\n");
- } else if (o instanceof Array) {
- Array a = (Array)o;
+ } else if (o instanceof JS.Array) {
+ JS.Array a = (JS.Array)o;
sb.append(" <" + name + " SOAP-ENC:arrayType=\"xsd:ur-type[" + a.length() + "]\">");
for(int i=0; i<a.length(); i++) appendObject("item", a.elementAt(i), sb);
sb.append("</" + name + ">\r\n");
}
}
- protected String send(Array args, HTTP http) throws JS.Exn, IOException {
+ protected String send(JS.Array args, HTTP http) throws JS.Exn, IOException {
// build up the request
StringBuffer content = new StringBuffer();
content.append("SOAPAction: " + action + "\r\n\r\n");