Depends on how you define successful, I suppose. First invention beyond a working prototype? Of first wide introduction to a military? Probably the Thompson SMG (not a rifle, but a long arm none the less), or the Garand and or the M1 carbine. Archy will know!
I think that I read[or heard] that both the BAR and Thompson were developed toward the end of WWI. The BAR to augment the firepower of the rifle squads and the Thompson for trench fighting.
The Thompson might be correct though I was thinking more of the standard troop rifle.
Of course, archy would know the nuts and bolts.