$arr = "";
}
echo $arr;
//echo "isadmin: ".isadmin(162);
//************************************************************************************************
if ($action == 'getHostList') {
    header("Content-type: text/x-json");
    //header('Content-Type: text/xml');
    if (isset($_POST['requestingUser'])) {
        $requestingUser = $_POST['requestingUser'];
    }
    try {
        $active = true;
        $params1 = array('requestingUser' => $requestingUser, 'active' => $active);
        $client = new SoapClient($wsdl, array('location' => $location));
        $result = $client->getHostList($params1);
        //$xml = new array2xml('hosts');
        //$xml->createNode( $result->host );
        //echo $xml;
        //$hosts = $result->host;
        echo json_encode($result->host);
    } catch (Exception $e) {
        echo $e->getMessage();
    } catch (SoapFault $soapfault) {
        echo $soapfault->getMessage();
    }
} else {
    if ($action == 'getConfiguration') {
        header("Content-type: text/x-json");
        if (isset($_POST['requestingUser'])) {
            $requestingUser = $_POST['requestingUser'];