 He earned a law degree from the State University of Iowa.He later earned a Master of Divinity from Iowa Wesleyan University.Hanley was a member of the Iowa National Guard and served in the United States Army during the Spanish–American War.