Self-consistent calculations of nuclear response for closed-shell nuclei