/** * Sets the server info by making a naming request by passing * its id which is in session id and parses it. * @param id ServerID */ protected function setServerID($id) { try { $this->sessionServerID = $id; $server = WebtopNaming::getServerFromID($id); $bits = parse_url($server); $this->sessionServerProtocol = isset($bits['protocol']) ? $bits['protocol'] : "http"; $this->sessionServer = $bits["host"]; $this->sessionServerPort = isset($bits['port']) ? $bits['port'] : 80; } catch (Exception $e) { //debug.error("Could not get server info from sessionid", e); throw new Exception("Invalid server id in session id: " . $e . getMessage()); } }