Goop.
They make a version for shoes, but I'm pretty sure all the versions are the same.
Nice thing about Goop is the removeability - since it's like a really thick rubber cement, you just peel it off.
I've glued shoe soles back on with it.
Edit: Looks like they don't make a shoe version, but the regular works well for shoes.
The marine version has an additive for UV.