X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FSOAP.java;h=113e01bb52cb06f6604eb396f52f4d1e941593a3;hb=8c1756ef3fd42cc2f324baf47e13a83f51045efe;hp=bceb99b366545e53c7a3b2da4e07d34fbb4b0f4a;hpb=e58686eae8a823ed64ed0ec92c2274c41d90ec93;p=org.ibex.core.git diff --git a/src/org/xwt/SOAP.java b/src/org/xwt/SOAP.java index bceb99b..113e01b 100644 --- a/src/org/xwt/SOAP.java +++ b/src/org/xwt/SOAP.java @@ -1,4 +1,4 @@ -// 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.*; @@ -41,9 +41,9 @@ class SOAP extends XMLRPC { if (name.equals("SOAP-ENV:Envelope")) return; if (name.equals("SOAP-ENV:Body")) return; if (name.equals("SOAP-ENV:Fault")) fault = true; - + // add a generic struct; we'll change this if our type is different - objects.addElement(new JS.Obj()); + objects.addElement(new JS()); for(int i=0; i\r\n"); - } else if (o instanceof ByteStream) { + } else if (o instanceof Res) { try { sb.append(" <" + name + " xsi:type=\"SOAP-ENC:base64\">\r\n"); - InputStream is = ((ByteStream)o).getInputStream(); + InputStream is = ((Res)o).getInputStream(); byte[] buf = new byte[54]; while(true) { int numread = is.read(buf, 0, 54); @@ -221,8 +221,8 @@ class SOAP extends XMLRPC { } sb.append("\r\n"); - } else if (o instanceof JS.Array) { - JS.Array a = (JS.Array)o; + } else if (o instanceof JSArray) { + JSArray a = (JSArray)o; sb.append(" <" + name + " SOAP-ENC:arrayType=\"xsd:ur-type[" + a.length() + "]\">"); for(int i=0; i\r\n"); @@ -230,13 +230,17 @@ class SOAP extends XMLRPC { } else if (o instanceof JS) { JS j = (JS)o; sb.append(" <" + name + ">"); - Object[] ids = j.keys(); - for(int i=0; i\r\n"); + } } - protected String send(JS.Array args, HTTP http) throws JS.Exn, IOException { + protected String send(JSArray args, HTTP http) throws JS.Exn, IOException { // build up the request StringBuffer content = new StringBuffer(); content.append("SOAPAction: " + action + "\r\n\r\n"); @@ -252,9 +256,11 @@ class SOAP extends XMLRPC { content.append(nameSpace != null ? " xmlns=\"" + nameSpace + "\"" : ""); content.append(">\r\n"); if (args.length() > 0) { - Object[] o = ((JS)args.elementAt(0)).keys(); - for(int i=0; i\r\n"); return content.toString();