[geeklog-cvs] Auth_Enterprise/Enterprise/Server SOAPHandler.php,NONE,1.1
tony at iowaoutdoors.org
tony at iowaoutdoors.org
Thu Jul 15 00:44:35 EDT 2004
Update of /var/cvs/Auth_Enterprise/Enterprise/Server
In directory www:/tmp/cvs-serv15601
Added Files:
SOAPHandler.php
Log Message:
Initial release. This is untested yet (will do so tomorrow)
--- NEW FILE: SOAPHandler.php ---
<?php
/**
* Auth_Enterprise
*
* This source file is subject to version 2.02 of the PHP license, that is bundled with this package
* in the file LICENSE, and is available at through the world-wide-web at
* http://www.php.net/license/2_02.txt. If you did not receive a copy of the PHP license and are
* unable to obtain it through the world-wide-web, please send a note to license at php.net so we can
* mail you a copy immediately.
*
* @author Tony Bibbs <tony at geeklog.net>
* @copyright 2004
* @version $Id: SOAPHandler.php,v 1.1 2004/07/15 04:44:32 tony Exp $
*
*/
/**
* The Auth_Enterprise Server Provider Factory
*/
require_once 'Auth/Enterprise.php';
/**
* Auth_Enterprise Privilege class
*/
require_once 'Auth/Enterprise/Privilege.php';
/**
* Auth_Enterprise Group class
*/
require_once 'Auth/Enterprise/Group.php';
/**
* Auth_Enteprise's SOAP Handler
*
* This class is a simple proxy. All it does is takes Auth_Enterprise request wrapped by SOAP and
* calls the method and returns a valid SOAP response to the calling application
*
* @author Tony Bibbs <tony at geeklog.net>
* @package net.geeklog.auth_enterprise.server
*
*/
class Auth_Enterprise_SOAPHandler {
/**
* The provider to handle requests.
* @access protected
*/
protected $provider = null;
/**
* Sets up the handler.
*
* @author Tony Bibbs <tony at geeklog.net>
* @param $applications array An array of applications to support.
* @return bool Success/failure
*/
public function __construct($applications)
{
$GLOBALS['_Auth_Enterprise_XMLRPCHandler'] = $applications;
return true;
}
/**
* Handles all SOAP requests made to Auth_Enterprise
*
* @author Tony Bibbs <tony at geeklog.net>
* @access public
* @return string valid SOAP response
*
*/
public static function handleRequest()
{
$options = $GLOBALS['_Auth_Enterprise_XMLRPCHandler'][$appId]['options'];
if (!isset($options['appId'])) {
$options['appId'] = $appId;
}
$provider =& Auth_Enterprise::serverSingleton($GLOBALS['_Auth_Enterprise_XMLRPCHandler'][$appId]['provider'], $options);
$sudServer = new SoapServer("http://192.168.1.3/Auth_Enterprise/soap/Auth_Enterprise.wsdl");
$sudServer->setClass(get_class($provider));
$sudServer->handle();
}
}
?>
More information about the geeklog-cvs
mailing list