Quantum calculation of the optical response of quantum well excitons in semiconductor microcavities