You should've shot down as much dudes with your gatling guns & canons, as they wouldn't have been able to fire back (melee units).
THEN, when canons are out of amo, that would have been the right time to send the infantry up the walls. But not in small waves! Send 'em at the same time!
Please watch some strategy learning vids or something like that! =D