PHP 5.3 deprecated ereg() function (#2820952)
[squirrelmail.git] / templates / default_rpc / rpc_response_success.tpl
index fa53d02529981b3eeb6ef7d0c736b0878a3904f1..4aa56f27ecccd269b0f26be2b874404b31a73761 100644 (file)
@@ -3,18 +3,18 @@
 /**
   * rpc_response_success.tpl
   *
 /**
   * rpc_response_success.tpl
   *
-  * Template for constructing a standard response to a remote 
-  * procedure call.
+  * Template for constructing a standard (SOAP-compliant)
+  * response to a remote procedure call.
   *
   * The following variables are available in this template:
   *
   * The following variables are available in this template:
-  *      + $result_code - The result code (optional; if not given 
-  *                       must default to 0 (zero))
-  *      + $result_text - Any result message (optional; may not be 
-  *                       present)
   *
   *
-  * @copyright © 1999-2007 The SquirrelMail Project Team
+  * string $rpc_action  The RPC action being handled
+  * int    $result_code The result code
+  * string $result_text Any result message (optional; may not be present)
+  *
+  * @copyright © 1999-2009 The SquirrelMail Project Team
   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
-  * @version $Id: rpc_response_success.tpl 12111 2007-01-11 08:05:51Z pdontthink $
+  * @version $Id$
   * @package squirrelmail
   * @subpackage templates
   */
   * @package squirrelmail
   * @subpackage templates
   */
 extract($t);
 
 
 extract($t);
 
 
-/*echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';*/
-echo '<?xml version="1.0" ?>';
-?>
-<response>
-    <status>OK</status>
-    <result_code><?php echo $result_code; ?></result_code>
-    <result_text><?php echo $result_text; ?></result_text>
-</response>
+echo '<?xml version="1.0" ?>'; ?>
+<soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sm="http://squirrelmail.org/rpc" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:soap-enc="http://www.w3.org/2003/05/soap-encoding" soap:encodingstyle="http://www.w3.org/2003/05/soap-encoding">
+  <soap:header>
+    <sm:result_code><?php echo $result_code; ?></sm:result_code>
+    <sm:result_text><?php echo $result_text; ?></sm:result_text>
+  </soap:header>
+  <soap:body>
+    <sm:<?php echo $rpc_action; ?>Response><?php
+/* TODO/FIXME: when data is returned to the client, it goes here.... */
+  ?></sm:<?php echo $rpc_action; ?>Response>
+  </soap:body>
+</soap:envelope>