First off, a Jedi cannot beat Superman. There's nothing a Jedi can do that would be capable of hurting him, including a lightsaber. Superman is invulnerable, and far too fast, and far too strong. A lightsaber would hit him and do nothing, if he can survive a supernova, then a lightsaber aint gonna do shit to harm him physically. The ONLY thing a Jedi could presumably do is hold him in one place with the force (so he couldn't move, not even Superman is strong enough to beat the force) however, There's nothing the Jedi could do to actually hurt him, so the best they could do is run away. Not that it would matter seeing as Supes is so fast he could kill all the Jedi in the Jedi temple before they even knew what was going on.
A fight with Yoda and Superman would go like this:
*Yoda looks at Superman, Supes seemingly disappears (Superspeed) and breaks Yoda's neck before he can even form a thought* End fight. Jedi are not fast enough to do anything if Superman wanted them dead. As I said, he could go into the Jedi temple, kill everyone there before 99% of them knew what was happening.
As for the X-men, what ones are we talking about here? Most of the X-men however are again not fast or strong enough to compete with Supes at all. Even the psychic ones are susceptible to his superspeed because Superman moves faster then the mind can form a thought. So...Prof. X isn't going to be able to think about controlling Supes, because he'd be long dead before he could. Not to mention Superman has a pretty good mental defences, so it would take Prof. X even longer to do anything (same with Jean Grey) Most of the rest of the X-men Superman could just stand there and laugh at as they "attempted" to harm him, which they couldn't.
Harry potter is human, and his spells are pretty crappy. And he is again susceptible to the "Supes moving before he can think" thing. So he loses.
Gandalf has the best shot here as his magic abilities are very powerful, but he again must think and cast the spell, by which time he would be dead.
There are people who can beat Superman, but not any of the people that are in this list. (depending on which X-men we're talking about)