From 65f1101563fe156abd56c788b33503bb22b803c0 Mon Sep 17 00:00:00 2001 From: seek3r Date: Wed, 7 Feb 2001 09:09:43 +0000 Subject: [PATCH] Adding xml-rpc classes which will be needed in future xml-rpc interface to our class --- phpgwapi/inc/class.xmlrpc.inc.php | 2 ++ phpgwapi/inc/class.xmlrpcs.inc.php | 1 + xmlrpcs_test.php | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 xmlrpcs_test.php diff --git a/phpgwapi/inc/class.xmlrpc.inc.php b/phpgwapi/inc/class.xmlrpc.inc.php index cfcad034be..caea3485d4 100644 --- a/phpgwapi/inc/class.xmlrpc.inc.php +++ b/phpgwapi/inc/class.xmlrpc.inc.php @@ -18,6 +18,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +class xmlrpc { } + if (!function_exists('xml_parser_create')) { // Win 32 fix. From: "Leo West" if($WINDIR) { diff --git a/phpgwapi/inc/class.xmlrpcs.inc.php b/phpgwapi/inc/class.xmlrpcs.inc.php index 12f231d0a3..793a6be522 100644 --- a/phpgwapi/inc/class.xmlrpcs.inc.php +++ b/phpgwapi/inc/class.xmlrpcs.inc.php @@ -20,6 +20,7 @@ // XML RPC Server class // requires: xmlrpc.inc +class xmlrpcs { } // listMethods: either a string, or nothing $_xmlrpcs_listMethods_sig=array(array($xmlrpcArray, $xmlrpcString), diff --git a/xmlrpcs_test.php b/xmlrpcs_test.php new file mode 100644 index 0000000000..23edc3647c --- /dev/null +++ b/xmlrpcs_test.php @@ -0,0 +1,22 @@ + * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ + + $phpgw_info["flags"] = array("currentapp" => "login", "noheader" => True); + include("header.inc.php"); + CreateObject("phpgwapi.xmlrpc"); + CreateObject("phpgwapi.xmlrpcs"); + + function hello($params) { + return new xmlrpcresp(new xmlrpcval("Hello World", "string")); + } + $s=new xmlrpc_server(array("examples.hello" => array("function" => "hello"))); +?> \ No newline at end of file