The mission should go like this:
1)Get to the keep (if you cannot even get there, I am so sorry

)
2)Clear the keep. This is relatively easy if you only aggro 1 group at a time
3)Have fun with the catapults while the enemy is hanging in the impact area. They wait there for a good while sometimes, and you can get them down to 1/2 or 1/4 health with simply the catapults.
4)When they come to the gate, head them off. If they are coming for both gates, 4 people at each is generally enough to dispel them
5)If one of the gates gets breached, everyone should fall immediately back to the King, and then push the way back out to the gates
If you have a rangers trapping at the gates, that works fairly well. Also, to avoid fire, casters can get up on the battlements directly above the gate. This way, the attacks of jade bows, etc. cannot hit them. In fact, if they try, they are wasting their time and firepower shooting at a wall