The Somalian government says a roadside bomb has exploded near the presidential palace and the attack by a militant group targeted the president's convoy.