A FAQ tem uma resposta à sua pergunta !
When you cast a spell that allows you to make a ranged touch attack (such as scorching ray), and an enemy is within reach, do you provoke two attacks of opportunity?
Yes, you provoke two attacks of opportunity: one for casting the spell and one for making a ranged attack, since these are two separate events.
(Note that a spell that fires multiple simultaneous rays, such as scorching ray, only provokes one AOO for making the ranged attack instead of one AOO for each ranged attack. It still provokes for casting the spell.)