xref: /dokuwiki/lib/exe/xmlrpc.php (revision 5c3fa1237fed70959d8f7612243d02b0d8dd40d8)
1797c0d11SAndreas Gohr<?php
2d4f83172SAndreas Gohr
31cdd0090SAndreas Gohr/**
41cdd0090SAndreas Gohr * XMLRPC API backend
51cdd0090SAndreas Gohr */
6dd87735dSAndreas Gohr
71cdd0090SAndreas Gohruse dokuwiki\Remote\XmlRpcServer;
8dd87735dSAndreas Gohr
94b867325SAndreas Gohrif (!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/../../');
10797c0d11SAndreas Gohr
11797c0d11SAndreas Gohrrequire_once(DOKU_INC . 'inc/init.php');
12797c0d11SAndreas Gohrsession_write_close();  //close session
13593bf8f6SMichael Klier
144b867325SAndreas Gohr$server = new XmlRpcServer(true);
154b867325SAndreas Gohrtry {
164b867325SAndreas Gohr    $server->serve();
174b867325SAndreas Gohr} catch (\Exception $e) {
18*5c3fa123SAndreas Gohr    $server->error($e->getCode() ?: 1, $e->getMessage());
194b867325SAndreas Gohr}
20