Xbee module works for 10 seconds
(1) Noe enough information provided.

(2) Too much happening. Probably.

(3) If "I am not able to repeat the same for the other module." means, "ever in amy circumstancve when operated in the manner which allows the other one to work", then if the two are identical parts with identical configurations then one is, by definition (more or less) broken. Or both are. Otherwise, 

(4) Xbee shield is probably not broken.



Re 20 second issue:

If this happens with bad Xbee only then work that out first.

If it happens with "good" xbee then somewhere there will be a boundary. You need to find it.

Do the absolutely minimum necessary to get interaction with the shield that you can detect (LED on or supply present or some signal occurring.
 THEN STOP.Let it sit. Does it "die" after or 30 seconds or one minute or more?


If not, work up in complexity from there.
If it does stop as before, work down in complexity and find what XBee directed activity (even with Xbee not being accessed) removes "stopping"