Rooting may void your warranty. But it is possible to unroot your phone so that you can claim your warranty.
How to Root your phone on ICS(4.0.3 only!):
1. READ THIS PROPERLY before rooting: http://forum.xda-developers.com/showthread.php?p=24887481#post24887481
2. after you have finished downloading( http://forum.xda-developers.com/showpost.php?p=24847709&postcount=18 ) , extract in C:\
3. enable usb debugging and allow unknown sources on phone
4. connect phone to pc
5. Double click on runme.BAT
6. follow onscreen instruction
7. Phone will boot many times
8. the computer screen will read : PRESS ANY KEY.
9 PRESS ANY KEY ONLY AFTER YOUR PHONE HAS COMPLETELY STARTED. (i.e the notification bar reads memory card connected )
10. when the window on pc closes u are done rooting :)
If you are getting the error 'system cannot find the path specified' while rooting your phone, it is because you right clicked the runme.bat file and selected 'run as administrator'. You may just double click the runme.bat file and the rooting will run fine.
If you need to confirm that your phone is rooted, there is a 'root checker' app available in Android play store. You can download it from https://play.google.com/store/apps/details?id=com.joeykrim.rootcheck&hl=en and click 'verify root access' so that a message will displayed stating your 'phone has root access'.
PS: Please read this carefully and I am not responsible if you are doing any steps wrongly and brick your phone
To root ICS 4.0.4
1)Flash 4.0.4(4.1.B.0.431) ICS and boot phone (links are given below)
2)Flash kernel from 4.0.3(4.1.A.0.562) ICS and boot phone. Flash only kernel, don't wipe anything!
3)download DooMLoRD's Rooting Toolkit for Xperia 2011 ICS [FW:.562]: http://forum.xda-developers.com/show....php?t=1601038
read instructions and root your phone
4)flash back kernel from 4.0.4(4.1.B.0.431) ICS. Flash only kernel, don't wipe anything!
FTF's with Kernel: