According to this site, warriors and mesmers have the longest ranged attacks, but this doesn't take into account traits which can increase range.
If traits are considered, which profession has the longest maximum range on an attack?
The Ranger does.
A few longbow attacks are already 1200 range, and the Eagle Eye trait expands that by 25%, to 1500 even.
The Engineer can extend grenade range to 1500 also. And since they are all AOE, are most useful in WVW.