Hong Kong challenges court and appeals to Beijing to reverse foreign lawyer ruling