Yemeni officials say al-Qaida militants ambushed a military convoy on Friday , killing 12 soldiers .