Wow!
Haha, I don't really know how i trained him as such, it was a progressive thing because we lived in a student flat without a garden, so he'd have heaps of floor time (wooden floors, massive rooms, absolute blessing) and kitchen/sofa time quite a lot.
If he were on the sofa or being handled, initially as a baby he'd make a really faint sort of wheek/chut if he needed to pee, but not knowing why he was doing it, i'd sit there chatting away and he'd just pee
So gradually over a few weeks when he'd get louder when he needed to pee, i'd flail, arms outstretched until eventually he'd really shout, and when he'd raise the roof i'd put him in the crook of my neck/shoulder and walk him to his cage.
So by 4 months if he made that certain little noise and i ignored him he'd pace if i wasn't sat down, and if i were he would run and sit on my shoulder! Tada =D