Al-A'mash narrated with the same chain that the Prophet (peace and blessings be upon him) took the ritual bath for janabah (major impurity): he washed his private part with his hand, then rubbed it on the wall, then washed it, then performed ablution as for prayer; and when he had finished his bath, he washed his feet.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 817