X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fxwt%2FSOAP.java;h=59fc5c07ee05efafe82e0350bafba26dd879ed93;hb=67eeff476179a91ae930ea89cbecde22132ca532;hp=648562f83d77a71fa133336401642ed0c23db013;hpb=ec3ce7739bc84c0641fc57efc8da9af89372013f;p=org.ibex.core.git diff --git a/src/org/xwt/SOAP.java b/src/org/xwt/SOAP.java index 648562f..59fc5c0 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 JSObj()); 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 Array) { - Array a = (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(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();