The muster rolls for Company E, 17th Illinois Cavalry, verify a Pvt. James S. Harvey served in that unit. The 17th Illinois Cavalry was a very major presence in north Missouri that summer, and was heavily involved in operations against guerrillas in the lead-up to Centralia. In fact, as memory serves me it was a scalping of one of Bloody Bill Anderson's men by a trooper of the 17th Illinois that set Bill off on his own scalping frenzy a week or two before Centralia.
Anyway, given the 17th Illinois' presence in the area, there was nothing unusual about Harvey's own presence on the train and it is my guess that he was heading to his unit. His service and pension files will probably shed more light on the issue.