X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FSOAP.java;h=2c4044fabcaa555fff523d0c4e18429289415377;hb=e1da86ef35e219b79c3de0c099cf82b2500dc448;hp=104e11ddb0263dd4aad495e9349f63b01e83bb4c;hpb=565aae615b34b3fa4d61a72d93b651ff648eb3c3;p=org.ibex.core.git diff --git a/src/org/xwt/SOAP.java b/src/org/xwt/SOAP.java index 104e11d..2c4044f 100644 --- a/src/org/xwt/SOAP.java +++ b/src/org/xwt/SOAP.java @@ -19,17 +19,17 @@ import org.bouncycastle.util.encoders.Base64; *
  • WSDL support * */ -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); + return new SOAP(url.toString(), (method.equals("") ? "" : method + ".") + name, http, action, nameSpace); } @@ -163,7 +163,7 @@ class SOAP /*extends XMLRPC*/ { } - /&* Appends the SOAP representation of o to sb &/ + /** Appends the SOAP representation of o to sb */ void appendObject(String name, Object o, StringBuffer sb) throws JSExn { if (o instanceof Number) { if ((double)((Number)o).intValue() == ((Number)o).doubleValue()) { @@ -201,8 +201,8 @@ class SOAP /*extends XMLRPC*/ { sb.append(((Boolean)o).booleanValue() ? "1" : "0"); sb.append("\r\n"); } 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); + if (Log.on) Log.info(this, "caught IOException while attempting to send a ByteStream via SOAP"); + if (Log.on) Log.info(this, e); throw new JSExn("caught IOException while attempting to send a ByteStream via SOAP"); } @@ -244,7 +244,7 @@ class SOAP /*extends XMLRPC*/ { } } - protected String send(JSArray args, HTTP http) throws JSExn, IOException { + protected String buildRequest(JSArray args) throws JSExn, IOException { // build up the request StringBuffer content = new StringBuffer(); content.append("SOAPAction: " + action + "\r\n\r\n"); @@ -256,7 +256,7 @@ class SOAP /*extends XMLRPC*/ { content.append(" xmlns:xsi=\"http://www.w3.org/1999/XMLSchema-instance\">\r\n"); content.append("\r\n"); content.append(" <"); - content.append(methodname); + content.append(method); content.append(nameSpace != null ? " xmlns=\"" + nameSpace + "\"" : ""); content.append(">\r\n"); if (args.length() > 0) { @@ -266,15 +266,17 @@ class SOAP /*extends XMLRPC*/ { appendObject((String)key, ((JS)args.elementAt(0)).get(key), content); } } - content.append(" \r\n"); + content.append(" \r\n"); return content.toString(); } - SOAP(String url, String methodname, String action, String nameSpace) { this(url, methodname, new HTTP(url), action, nameSpace); } + SOAP(String url, String methodname, String action, String nameSpace) { + this(url, methodname, new HTTP(url), action, nameSpace); + } SOAP(String url, String methodname, HTTP http, String action, String nameSpace) { super(url, methodname, http); this.action = action; this.nameSpace = nameSpace; } -*/ + }