兵士の気節に於るが如く means not "like the moral backbone of soldiers" but "like in the moral backbone of soldiers" or "similarly to the case of the moral backbone of soldiers". (気骨 is a fairly rare word and I don't know if 'moral backbone' is the best translation, but let's leave it for now.)
- が如く is roughly the same as の如く, and they mean "like ~" or "similarly to ~". が was a possession marker in classical Japanese. It follows a noun.
- 於る【おける】 is a perfective attributive form of 於く【おく】 in classical Japanese, but you probably know this as a fixed grammar pattern. For now, please know that attributive form of a classical verb worked as a noun, and this pattern sometimes appears in modern Japanese, too. So here 兵士の気節に於る is a noun phrase meaning "the case/situation of the moral backbone of soldiers".
Likewise, 社会民主党などといふ場合に於けるが如く in the example you found means "as seen in the case where people say something like 社会民主党", or more naturally, "like when people refer to 社会民主党" or "as in the case of 社会民主党".