A senior South African police official has been hospitalised after gunmen opened fire on his vehicle in Johannesburg, days before he was expected to appear before a high-profile inquiry into alleged corruption and criminal networks within the country's police service.