A 285

From Rules Compendium on page 16:
RANGED ATTACKS
With a ranged weapon, you can shoot or throw at any target that is within the weapon’s maximum range (see Range Penalty). Line of sight isn’t required—you can fire at a creature that has concealment, hoping you hit your target. Intervening creatures and obstacles, however, can block your shot or provide cover for the creature you’re aiming at. You provoke attacks of opportunity when firing or throwing a ranged weapon.
From Complete Arcane on page 85:
WEAPONLIKE SPELLS
Any spell that requires an attack roll and deals damage functions as a weapon in certain respects, whether the spell deals normal hit point damage, nonlethal damage, ability damage, or energy drain. Such spells can threaten critical hits, can be used in sneak attacks, and can be used with favored enemy damage bonuses. You can even use a number of combat-enhancing feats from the Player’s Handbook to improve the effectiveness of weaponlike spells, as noted in Chapter 3 of this book.
From Rules Compendium on page 134:
Ray
Some effects are rays. You aim a ray as if using a ranged weapon, though typically you make a ranged touch attack rather than a normal ranged attack. As with a ranged weapon, you can fire into the dark or at an invisible creature, hoping you hit your target. You don’t have to see the creature you’re trying to hit, as you do with a targeted spell. Intervening creatures and obstacles, however, can block your shot or provide cover for the creature you’re aiming at.
I'm afraid that's about as much clarification as you're likely to get for this question. A ranged attack with a weapon provokes attacks of opportunity, and a weaponlike spell is treated as a weapon in almost all respects regarding its attack (though less so regarding its damage). The RAW citations don't actually come out and state that a ranged attack with a weaponlike spell functions as a ranged weapon attack in respect to attacks of opportunity.