Are you sure the charger is working correctly?
My iPhone had an issue with the wall charger at one point as well but was fine charging from the computer. I tried different cables, wall adapaters, fuses etc. but nothing seemed to work. I restore the iPhone and it worked straight away.