Sahih Muslim Book 2, Hadith Number 517.

Chapter : Easing is forbidden in the streets and under the shade.

Anas b. Malik reported: The Messenger of Allah (may peace be upon him) entered an enclosure while a servant was following him with a jar of water and he was the youngest amongst us and he placed it by the side of a lote-tree. When the Messenger of Allah,(may peace be upon him) relieved himself, he came out and had cleansed himself with water.