Many-Body Effects in XPS for Adsorbed Atoms and Molecules