It's in the army record which is available free of charge from the National Archives (as previously referenced ) and also on FindMyPast (as Ellenmai discovered).
Marrying the mother of an illegitimate child would not have made the child legitimate in law.