What Obama's campaign released via first link above states he served in the Infantry. I assume it's possible the records are wrong, or he changed branches. But I'm unaware of that as a standard practice. Perhaps it happened during WWII for manpower reasons? Otherwise, Obama's Great Uncle would seem to have done most of his marching and liberating while at sea.