2003/12/16 00:04:21
[org.ibex.core.git] / src / org / xwt / SOAP.java
index 4ffb8a0..5e6d463 100644 (file)
@@ -1,3 +1,4 @@
+// FIXME
 // Copyright 2003 Adam Megacz, see the COPYING file for licensing [GPL]
 package org.xwt;
 
@@ -19,15 +20,15 @@ import org.bouncycastle.util.encoders.Base64;
  *      <li> WSDL support
  *  </ul>
  */
-class SOAP extends XMLRPC {
-
-    /** the desired content of the SOAPAction header */
+class SOAP /*extends XMLRPC*/ {
+    /*
+    /&* the desired content of the SOAPAction header &/
     String action = null;
 
-    /** the namespace to use */
+    /&* the namespace to use &/
     String nameSpace = null;
 
-    /** When you get a property from an SOAP, it just returns another SOAP with the property name tacked onto methodname. */
+    /&* When you get a property from an SOAP, it just returns another SOAP with the property name tacked onto methodname. &/
     public Object get(String name) {
         return new SOAP(url.toString(), (methodname.equals("") ? "" : methodname + ".") + name, http, action, nameSpace);
     }
@@ -43,7 +44,7 @@ class SOAP extends XMLRPC {
         if (name.equals("SOAP-ENV:Fault")) fault = true;
  
         // add a generic struct; we'll change this if our type is different
-        objects.addElement(new JSObj());
+        objects.addElement(new JS());
 
         for(int i=0; i<keys.length; i++) {
             String key = keys[i];
@@ -153,14 +154,18 @@ class SOAP extends XMLRPC {
 
         } else if (parent != null && parent instanceof JS) {
             objects.removeElementAt(objects.size() - 1);
-            ((JS)parent).put(name, me);
+            try {
+                ((JS)parent).put(name, me);
+            } catch (JSExn e) {
+                throw new Error("this should never happen");
+            }
 
         }
 
     }
 
-    /** Appends the SOAP representation of <code>o</code> to <code>sb</code> */
-    void appendObject(String name, Object o, StringBuffer sb) throws JS.Exn {
+    /&* Appends the SOAP representation of <code>o</code> to <code>sb</code> &/
+    void appendObject(String name, Object o, StringBuffer sb) throws JSExn {
         if (o instanceof Number) {
             if ((double)((Number)o).intValue() == ((Number)o).doubleValue()) {
                 sb.append("                <" + name + " xsi:type=\"xsd:int\">");
@@ -199,7 +204,7 @@ class SOAP extends XMLRPC {
             } catch (IOException e) {
                 if (Log.on) Log.log(this, "caught IOException while attempting to send a ByteStream via SOAP");
                 if (Log.on) Log.log(this, e);
-                throw new JS.Exn("caught IOException while attempting to send a ByteStream via SOAP");
+                throw new JSExn("caught IOException while attempting to send a ByteStream via SOAP");
             }
 
         } else if (o instanceof String) {
@@ -240,7 +245,7 @@ class SOAP extends XMLRPC {
         }
     }
 
-    protected String send(JSArray args, HTTP http) throws JS.Exn, IOException {
+    protected String send(JSArray args, HTTP http) throws JSExn, IOException {
         // build up the request
         StringBuffer content = new StringBuffer();
         content.append("SOAPAction: " + action + "\r\n\r\n");
@@ -272,5 +277,5 @@ class SOAP extends XMLRPC {
         this.action = action;
         this.nameSpace = nameSpace;
     }
-
+*/
 }