X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FXMLRPC.java;h=2bb107c46d64aa2b6b9d85211aa402d2f3862f5f;hb=163ff4c57ec557bb8615f80e875f045cdfbad696;hp=13669ca5e0975697a071a727bff1045690720f8a;hpb=75b9e1e72f6067e59a1e5312c91d20d05ec8a927;p=org.ibex.core.git diff --git a/src/org/xwt/XMLRPC.java b/src/org/xwt/XMLRPC.java index 13669ca..2bb107c 100644 --- a/src/org/xwt/XMLRPC.java +++ b/src/org/xwt/XMLRPC.java @@ -39,9 +39,9 @@ class XMLRPC extends JS { /** this holds character content as we read it in -- since there is only one per instance, we don't support mixed content */ protected AccessibleCharArrayWriter content = new AccessibleCharArrayWriter(100); - protected String url = null; ///< the url to connect to - protected String method = null; ///< the method name to invoke on the remove server - protected HTTP http = null; ///< the HTTP connection to use + protected String url = null; ///< the url to connect to + protected String method = null; ///< the method name to invoke on the remove server + protected HTTP http = null; ///< the HTTP connection to use private Hash tracker; ///< used to detect multi-ref data protected boolean fault = false; ///< True iff the return value is a fault (and should be thrown as an exception) @@ -92,8 +92,9 @@ class XMLRPC extends JS { case "boolean": objects.setElementAt(content.getBuf()[0] == '1' ? Boolean.TRUE : Boolean.FALSE, objects.size() - 1); case "string": objects.setElementAt(new String(content.getBuf(), 0, content.size()), objects.size() - 1); case "double": objects.setElementAt(new Double(new String(content.getBuf(), 0, content.size())), objects.size() - 1); - case "base64": objects.setElementAt(new Stream.ByteArray(Base64.decode(new String(content.getBuf(), 0, content.size())), - null), objects.size() - 1); + case "base64": + objects.setElementAt(new Stream.ByteArray(Base64.decode(new String(content.getBuf(), 0, content.size())), + null), objects.size() - 1); case "name": objects.addElement(new String(content.getBuf(), 0, content.size())); case "value": if ("".equals(objects.lastElement())) objects.setElementAt(new String(content.getBuf(), 0, content.size()), objects.size() - 1); @@ -108,19 +109,19 @@ class XMLRPC extends JS { try { JSDate nd = new JSDate(); double date = JSDate.date_msecFromDate(Double.valueOf(s.substring(0, 4)).doubleValue(), - Double.valueOf(s.substring(4, 6)).doubleValue() - 1, - Double.valueOf(s.substring(6, 8)).doubleValue(), - Double.valueOf(s.substring(9, 11)).doubleValue(), - Double.valueOf(s.substring(12, 14)).doubleValue(), - Double.valueOf(s.substring(15, 17)).doubleValue(), - (double)0 - ); + Double.valueOf(s.substring(4, 6)).doubleValue() - 1, + Double.valueOf(s.substring(6, 8)).doubleValue(), + Double.valueOf(s.substring(9, 11)).doubleValue(), + Double.valueOf(s.substring(12, 14)).doubleValue(), + Double.valueOf(s.substring(15, 17)).doubleValue(), + (double)0 + ); nd.setTime(JSDate.internalUTC(date)); objects.setElementAt(nd, objects.size() - 1); } catch (Exception e) { - if (Log.on) Log.info(this, "error parsing date : " + s); - if (Log.on) Log.info(this, e); + throw new RuntimeException("xwt.net.rpc.xml.recieve.malformedDateTag" + + "the server sent a tag which was malformed: " + s); } case "member": Object memberValue = objects.elementAt(objects.size() - 1);