Revision: 2794
          http://vexi.svn.sourceforge.net/vexi/?rev=2794&view=rev
Author:   mkpg2
Date:     2008-02-24 13:00:59 -0800 (Sun, 24 Feb 2008)

Log Message:
-----------
'Feature'. Breaking xmlrpc spec (slightly) and allowing nulls to be sent and 
returned. 
Not using any extra namespaces to signify, as in the apache extensions. Perhaps
this can be elaborated later, but its simple and non-breaking (except in 
contrived situations).

Modified Paths:
--------------
    trunk/core/org.ibex.js/src/org/ibex/js/XMLRPC.jpp

Modified: trunk/core/org.ibex.js/src/org/ibex/js/XMLRPC.jpp
===================================================================
--- trunk/core/org.ibex.js/src/org/ibex/js/XMLRPC.jpp   2008-02-23 20:51:16 UTC 
(rev 2793)
+++ trunk/core/org.ibex.js/src/org/ibex/js/XMLRPC.jpp   2008-02-24 21:00:59 UTC 
(rev 2794)
@@ -107,6 +107,7 @@
         
         public void endElement(Tree.Element c) {
             //#switch(c.getLocalName())
+               case "nil": setLast(null);
             case "int": setLast(JSU.N(Integer.parseInt(new 
String(content.getBuf(), 0, content.size()))));
             case "i4": setLast(JSU.N(Integer.parseInt(new 
String(content.getBuf(), 0, content.size()))));
             case "boolean": setLast(content.getBuf()[0] == '1' ? JSU.T : 
JSU.F);
@@ -207,8 +208,9 @@
     void appendObject(JS o, StringBuffer sb) throws JSExn {
 
         if (o == null) {
-            throw new JSExn("attempted to send a null value via XML-RPC");
-
+               // FEATURE - vexi property to allow enable/disable this 
extension
+            //throw new JSExn("attempted to send a null value via XML-RPC");
+            sb.append("                <value><nil/></value>");
         } else if (o instanceof JSNumber) {
                if(JSU.isInt((JS) o)){
                 sb.append("                <value><i4>");


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to