3.5 PHB Pg. 158 said:
If you're trying to sunder a weapon or shield use the following steps ... [followed by a chart of weapon HP and Hardness, including projectile weapons]
Strictly by the RAW, the archer still gets to make his attack roll, because it doesnt explicity exclude ranged weapons from the chart, or state that the opposed rolls are both melee rolls. The attacking roll definitely is a melee attack, but the opposed one is just an "attack roll".
I agree that this is idiotic though, and would definitely
house rule that the attack would need to be a melee attack roll, imposing a -4 penalty for it being an improvised melee weapon, and would also rule that it would be a One-Handed improvised melee weapon.
A similar(and IMHO supporting) situation is sundering a javelin. Its a one handed simple ranged weapon that can be used in melee at a -4 penalty, since that is not how it is intended to be used (description, PHB 3.5 Pg. 118). I would say that that describes the bow in melee pretty well, within the limitations of the rules system. The javelin would use a melee attack to oppose the sunder, and have to accept the -4 penalty. I argue for a similar resolution to bow sundering.
If I was feeling particularly generous, I would allow the archer to use a BAB + Dex roll, as I imagine the archer would be attempting to swing his weapon out of the way of the longsword, rather than try to meet the blow solidly so as to avoid damage to the weapon(as the opposed melee rolls are attempting to simulate). I still wouldnt allow any weapon focus / enhancement bonuses to the roll since the add to helping you place arrows in your target accurately, not keep your bow out of reach of some longsword.
Anyways, enough rambling from me for now.
Cya on the flip side.
Jeff