XBEE and Arduino

Hello

I have two XBEEs configured and one is hooked up to an Arduino. The Arduino is also connected to a 4 x4 matrix keypad. I am trying to send inputs from the keypad to the other XBEE (I am reading the information on the console log on XCTU). However it is not working. When I use the serial monitor and use the desktop keyboard to type in inputs the information is sent to the other XBEE and works perfectly fine. Can anyone help. I have attached my code to this post. Thanks in advance!

Here is the code in case you are skeptical of downloading png file

#include <Keypad.h>
#include <SoftwareSerial.h>

const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'#','0','*','D'}
};
byte rowPins[ROWS] = {4, 3, 2, 1}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {8, 7, 6, 5}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

SoftwareSerial XBee(0, 1); // RX, TX

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

void loop(){
char key = keypad.getKey();

if (key != NO_KEY){
Serial.println(key);
}

if (Serial.available())
{ // If data comes in from serial monitor, send it out to XBee
XBee.write(Serial.read());
}

}

Easy, for SoftwareSerial, change 0 and 1 to any other two digital pins. 0 and 1 are RESERVED for the hardware serial port, Serial.