Not sure what you mean by training. I have always trained my chickens and geese to come when they are called. That is simple as they learn that when you call them there is a treat to be had.
Coming when called and going into the coop is fairly easy. Figure out their favorite treats and only give it to them when you give a specific call for them. They will soon learn that that call = treats. Getting them to go into their coop is also easy. Only give them their daily feed inside their coop and at a specific time like in the evening. And they'll be waiting in their coop for their feed every evening before long. Training to attack is just about impossible unfortunately sorry.
What if I made someone make noise/annoy the geese and just when they are about to attack I say "Attack!"? They would see that "attack" means attack, right?