Licence refused to married gay hospital chaplain