Sahih Bukhari Volume 007, Book 062, Hadith Number 009.
Narrated By Ibn Masud : We used to fight in the holy battles in the company of the Prophet and we had no wives with us. So we said, "O Allah's Apostle! Shall we get castrated?" The Prophet forbade us to do so.