I have this problem about once a week with my 4s on AT&T where iMessages fail and I cannot access any websites or get any data. Regular SMS messages and phone calls work. I have full AT&T 4 g service. Switching to airplane mode and back doesn't fix it. I have to reboot the phone then it's fine.