Arduino Mega + XBee Shield + RAMPS 1.4 Is it possible?
Yes, it would seem like folks on the RepRap forums have gotten this to work with the following setup that should work in general:


  Attach the XBee shield to the RAMPS board by attaching 4 pins on AUX-1 (namely, 5V, Gnd, D1 and D0) to the 5V, Gnd, Rx and Tx pins on the XBee Shield
  
  Switch the UART / DLINE switch on the XBee Shield to UART


Source: RepRap Forum: Printing completely wirelessly - can it be done?

This forum thread may also be useful.