In trying to both invent and prevent mediums with which opposing armies can defeat "Army X", I come to you, stack exchange, hoping for some second-opinions on how to 'defeat an immortal army'.
In essence; "How does an army equipped with standard blades and shields (and the etc that comes with it) ultimately defeat, or otherwise fend off invaders who are immortal?"
I wish to find novel ways to deal with them, or to patch up loopholes, that I'd like to see removed, with new conditions.
Conditions:
1. Army X is immortal. Its soldiers can be 'killed' temporarily, but will be spontaneously revived after a few seconds where they fell with their wounds removed, including but not limited to dismemberment, beheading, etc.
2. Those individuals in Army X who find their bodies 'stuck' (such as in a pit, chained, etc) can instead opt to resurrect inside of a suit of armor elsewhere in the world. The same goes for bodies otherwise completely and irreversibly destroyed. Note that said armor is specially designed and constructed, meant solely to house said dead warrior of Army X should they be faced with a trapped original body. Said armors are located only in their capital city. A warrior of Army X that has undergone this transfer in no longer flesh and blood, but rather a walking animated suit of armor from then on.
3. The medium with which Army X maintains their immortality is through a single individual living within an 'impenetrable city' (which could be a discussion for another time). For all tends and purposes in this question, this healer cannot be killed, or their powers otherwise nullified.
4. Each member of Army X is, in essence, a 'hero'. They are the sort of character capable of fending off a great number of enemy grunts single-handedly. No other nation possesses the capacity to create anywhere near as many soldiers of the same caliber.
5. Though the enemies of Army X do possess the capacity for spell-slinging, for this question consider them incapable of magic; I'm looking for other solutions to defeating/fending off the army than magic.
6. Soldiers of Army X do need food and water, but can be revived regardless of death from starvation/thirst.
7. Soldiers of Army X die from old age, and are not revived upon doing so. They cannot, however, be afflicted to grow older faster (due to magic, for example).
To reiterate
What sort of tactics/strategy could an army with mundane medieval weaponry utilize to defeat or otherwise fend off invading Army X?
EDIT Based on comments/responses, I'd like to point out that the apparent unstoppability of Army X is completely intentional. Army X is meant (at least, for a time) to be unstoppable. For the world in question, their unstoppability does not last, but I wanted to explore any possible ways I hadn't considered before that they could still be defeated. Condition 3, namely, is the medium by which their unstoppability is lost.