I'm not sure if this is still valid, not tried it myself yet, but it is from a 4.0 post blizz framework download folder I have. Hopefully these will help you if you haven't tried these yet.
Code:
local prof1, prof2, arch, fish, cook, firstAid = GetProfessions();
local name, texture, rank, maxRank, numSpells, spelloffset, skillLine = GetProfessionInfo(index);
local prof_title = "";
for i=1,#PROFESSION_RANKS do
local value,title = PROFESSION_RANKS[i][1], PROFESSION_RANKS[i][2];
if maxRank < value then break end
prof_title = title;
end