From the nonpartisan web site OpenSecrets:
According to an analysis of campaign contributions by the nonpartisan Center for Responsive Politics, Democrat Barack Obama has received nearly six times as much money from troops deployed overseas at the time of their contributions than has Republican John McCain, and the fiercely anti-war Ron Paul, though he suspended his campaign for the Republican nomination months ago, has received more than four times McCain’s haul.
Among all military personnel (deployed and not deployed), Obama beat McCain in contributions by about $55,000. This is a reversal of conventional wisdom, which generally holds that the military is more Republican than Democratic.