The difference is in the type character represented in a general class of people (braggart servant)and the other is the stock character(braggart soldier) noteable for individuality eg: the miles glorious.
Soldier is a term referring to service members of land based ground forces. The Army, countries with a Republican Guard... those would be soldiers. Marine is most commonly used in English speaking...
A soldier fights for his country, a mercenary fights for his own reasons or for money. Nonetheless soldiers get paid too, so just as a mercenary by definition fights for some sort of gain, usually...
A knight is a kind of soldier under the feudal system. Knights were given grants of land by a lord in return for a promise to fight for him when called on.Working on the Knights land were peasants...
A soldier is the person that has just entered any Military force, the warrior is the person that being part of a Military force goes to combatsolider=grunt or workerwarrior= expert combat killer