X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FSOAP.java;h=8315755b6b4c9c4b316be1e7b9f8ebe198a54ebf;hb=73131826a18c93af4fb04672bc3ec820e1197ad1;hp=c2764d28780da459aad5abe14aab544d1cfe3665;hpb=44ba228826e0d6a6c4ad3ed0072b90e05622ee21;p=org.ibex.js.git diff --git a/src/org/ibex/js/SOAP.java b/src/org/ibex/js/SOAP.java index c2764d2..8315755 100644 --- a/src/org/ibex/js/SOAP.java +++ b/src/org/ibex/js/SOAP.java @@ -1,4 +1,7 @@ -// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] +// Copyright 2000-2005 the Contributors, as shown in the revision logs. +// Licensed under the Apache Public Source License 2.0 ("the License"). +// You may not use this file except in compliance with the License. + package org.ibex.js; import java.io.*; @@ -41,7 +44,7 @@ public 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 JS()); + objects.addElement(new JS.O()); for(int i=0; i 1 ? objects.elementAt(objects.size() - 2) : null; + JS parent = objects.size() > 1 ? (JS)objects.elementAt(objects.size() - 2) : (JS)null; // we want to fold stuff back into the fault object if (objects.size() < 2) return; @@ -152,7 +155,7 @@ public class SOAP extends XMLRPC { } else if (parent != null && parent instanceof JS) { objects.removeElementAt(objects.size() - 1); try { - ((JS)parent).put(name, me); + ((JS)parent).put(JS.S(name), me); } catch (JSExn e) { throw new Error("this should never happen"); } @@ -235,7 +238,7 @@ public class SOAP extends XMLRPC { Enumeration e = j.keys(); while(e.hasMoreElements()) { Object key = e.nextElement(); - appendObject((String)key, j.get(key), sb); + appendObject((String)key, j.get((JS)key), sb); } sb.append("\r\n"); @@ -260,8 +263,8 @@ public class SOAP extends XMLRPC { if (args.length() > 0) { Enumeration e = ((JS)args.elementAt(0)).keys(); while(e.hasMoreElements()) { - Object key = e.nextElement(); - appendObject((String)key, ((JS)args.elementAt(0)).get(key), content); + JS key = (JS)e.nextElement(); + appendObject(((JSString)key).coerceToString(), ((JS)args.elementAt(0)).get(key), content); } } content.append(" \r\n");