And that's exactly where the military action fails. It will not turn Palestinians against Hamas. It's quite natural they turn against the one who is bombing them, not the idiots that provoked the attacks. Thus, Israel is not defending itself from rocket attacks - it's only escalating the conflict. Really, it's the best thing that could happen to Hamas and the reason why they keep firing rockets into Israel.
Let's turn our attention to Iraq. How many Iraqi civilians are grateful to the US for getting rid of Saddam Hussein at the cost of being bombed back to stone age and being pretty much caught in the crossfire between radicals and American troops?
War is not where diplomacy fails. War is where diplomacy gets really ugly. Yet, it's still all about diplomacy (which is nothing more than cross-border politics).