I think an Attack of Opportunity (AoO) applies.
There is a very clear rule that if you cast a spell in melee you trigger an AoO. For this rule to be waived, I would need to see an equally clear exception – in the rules. In the case of the Magus, this exception doesn't seem to exist.
The Magus's ability to cast and attack in the same round is very cool. Triggering an AoO by casting is a limiting factor on this very cool ability, but the limit is reasonable. It applies to all other spellcasters; why shouldn't it apply to a Magus?
To say that the Magus should waive AoO triggers because she can also attack in the same round is, for mine, a bridge too far.