public function getVersionMap($connectionPath)
    {
        $versions = [];

        $input = $this->_inputChannel->getInputStream($connectionPath);
        $contents = stream_get_contents($input);

        $discoveryInfo = Utilities::unserialize($contents);

        $endpoints = $discoveryInfo['RuntimeServerEndpoints']
            ['RuntimeServerEndpoint'];

        if (array_key_exists('@attributes', $endpoints)) {
            $endpoints = [];
            $endpoints[] = $discoveryInfo
                ['RuntimeServerEndpoints']['RuntimeServerEndpoint'];
        }

        foreach ($endpoints as $endpoint) {
            $versions[$endpoint['@attributes']['version']] = $endpoint
                ['@attributes']['path'];
        }

        return $versions;
    }