sparkfun xbee sheild and arduino mega 2560

Lately I have been interfacing two XBees with two Arduino Unos via the sparkfun XBee shield, which can be found here: SparkFun XBee Shield - WRL-12847 - SparkFun Electronics

Now, I want to interface a third XBee with a Mega instead of an Uno but using that same shield being stacked on top of the mega. So far, I'm having issues with reading any data coming to the XBee that is connected to the mega.

Moreover, I used the serial3 port to communicate with the XBee and also jump wired pins 2 and 3 on the XBee shield to pins 14 and 15 on the mega.

This is what my test code looks like so far:

  int myData = 0;

void setup() {
  Serial.begin(9600);
  Serial3.begin(9600);
}

void loop() {

  if(Serial3.available()>0){  ////Serial1 -->(14,15)
   
      Serial3.print("test");
      Serial3.print("test");
  }  
}

When I open the serial port nothing is printed. What am I doing wrong here?

Mujyy:
Moreover, I used the serial3 port to communicate with the XBee and also jump wired pins 2 and 3 on the XBee shield to pins 14 and 15 on the mega.

You do realize that pins 2 and 3 do still connect to the Mega even if you jump wire them somewhere else?

ieee488:
You do realize that pins 2 and 3 do still connect to the Mega even if you jump wire them somewhere else?

I know, they are under the shield. I tried with pins 2 and 3 but it still did not work.

Never mind, I got it working now.

ieee488:
You do realize that pins 2 and 3 do still connect to the Mega even if you jump wire them somewhere else?

The UART worked and I was seeing bytes being received in the serial monitor. However, when I switch from UART to DLINE with pins 2 and 3 being the RX and TX, I still don't see anything come up on the serial monitor, despite that when I use the UNO, I do see the bytes being received in both configurations of the shield. Why does it not work on the mega with DLINE with pins 2 and 3 configured?