Sources of Extragalactic Cosmic Rays: Photons and Neutrinos as Probes