he served the king of denmark as the army infantry captain