wireless cummunication

I am doing a wirless lock using arduinos and xbee series 2. Basically, i have to enter a passcode on the keypad and it should communicate wirelessly and should give signal so that the door opens. I wrote the code for the first arduino. It's working. Whenever i enter the passcode for the lock ,it gives signal and LED goes ON which means its working. But now it should communicate wirelessly and should tell the other xbee to unlock the door. Do i need to write code for receiving arduino as well or just by using xbees will work? How to make it work... Any help

peacelover: Do i need to write code for receiving arduino as well

Yes.

How to make it work... Any help

http://www.jeremyblum.com/2011/02/27/arduino-tutorial-9-wireless-communication/