2003/04/24 10:25:09
[org.ibex.core.git] / src / org / xwt / XMLRPC.java
index d70dd7c..2bbebb9 100644 (file)
@@ -290,7 +290,11 @@ class XMLRPC extends XML implements Function {
         else objects.setSize(0);
 
         String content = send(args, http);
-        if (Log.verbose) Log.log(this, "send: " + content);
+        if (Log.verbose) {
+            String s;
+            BufferedReader br2 = new BufferedReader(new StringReader(content));
+            while ((s = br2.readLine()) != null) Log.log(this, "send: " + s);
+        }
 
         HTTP.HTTPInputStream is = http.POST("text/xml", content);
         try {
@@ -307,7 +311,7 @@ class XMLRPC extends XML implements Function {
                             if (ret == -1) return ret;
                             String s;
                             BufferedReader br2 = new BufferedReader(new StringReader(new String(c, off, ret)));
-                            while ((s = br2.readLine()) != null) if (Log.on) Log.log(this, "recv: " + s);
+                            while ((s = br2.readLine()) != null) Log.log(this, "recv: " + s);
                             return ret;
                         }
                     });
@@ -319,6 +323,7 @@ class XMLRPC extends XML implements Function {
 
     protected String send(Object[] args, HTTP http) throws JavaScriptException, IOException {
         StringBuffer content = new StringBuffer();
+        content.append("\r\n");
         content.append("<?xml version=\"1.0\"?>\n");
         content.append("    <methodCall>\n");
         content.append("        <methodName>");