Example #1
0
 * You should have received a copy of the GNU Affero General Public License
 * along with Xibo.  If not, see <http://www.gnu.org/licenses/>.
 */
DEFINE('XIBO', true);
include_once "lib/xmds.inc.php";
$method = Kit::GetParam('method', _REQUEST, _WORD, '');
$service = Kit::GetParam('service', _REQUEST, _WORD, 'rest');
$response = Kit::GetParam('response', _REQUEST, _WORD, 'xml');
$serviceResponse = new XiboServiceResponse();
// Is the WSDL being requested.
if (isset($_GET['wsdl']) || isset($_GET['WSDL'])) {
    $serviceResponse->WSDL();
}
// Is the XRDS being requested
if (isset($_GET['xrds'])) {
    $serviceResponse->XRDS();
}
if (defined('XMDS')) {
    $service = 'soap';
}
// Check to see if we are going to consume a service (if we came from xmds.php then we will always use the SOAP service)
if (defined('XMDS') || $method != '') {
    // Create a service to handle the method
    switch ($service) {
        case 'soap':
            Kit::ClassLoader('xmdssoap');
            try {
                $soap = new SoapServer('lib/service/service.wsdl');
                $soap->setClass('XMDSSoap');
                $soap->handle();
            } catch (Exception $e) {