- fix bug 3002710: ex:nil not bound because ex namespace not included
[plcapi.git] / lib / xmlrpc.inc
index ad41414..36ea008 100644 (file)
 \r
        // set to TRUE to enable encoding of php NULL values to <EX:NIL/> instead of <NIL/>\r
        $GLOBALS['xmlrpc_null_apache_encoding']=false;\r
+    $GLOBALS['xmlrpc_null_apache_encoding_ns']='http://ws.apache.org/xmlrpc/namespaces/extensions';\r
 \r
        // used to store state during parsing\r
        // quick explanation of components:\r
                                $this->content_type = 'text/xml; charset=' . $charset_encoding;\r
                        else\r
                                $this->content_type = 'text/xml';\r
-                       $result = "<methodResponse>\n";\r
+                   if ($GLOBALS['xmlrpc_null_apache_encoding'])\r
+                   {\r
+                       $result = "<methodResponse xmlns:ex=\"".$GLOBALS['xmlrpc_null_apache_encoding_ns']."\">\n";\r
+                   }\r
+                   else\r
+                   {\r
+                       $result = "<methodResponse>\n";\r
+                   }\r
                        if($this->errno)\r
                        {\r
                                // G. Giunta 2005/2/13: let non-ASCII response messages be tolerated by clients\r