Must been with the early war planes sorry abut that.
Some WW1 aircraft did in fact have a gun mounted on the top of the wing. The German's developed the interruptor gear that allowed pilots to fire through the prop without blowing the prop apart. It wasn't long after the Germans started using cowl mounted guns that the Allies also began installing them. I might be wrong, but I believe that the British captured a downed German aircraft and essentially stole the technology.
Here is a photo of an SE-5a, which was a pretty successful British fighter, with a wing mounted Lewis gun.
