Let me be honest from the start. I am mainly a rhythm guy, but I've learned a few things over the years. Alot of it in the short month I got to jam with a crackhead off his pipe. The guy was simply unbelievable. He probably hadn't played in ten or more years, but due to his knowledge of scales and modes, and his technical ability, no matter what I played, he played some wicked solo's over it.
Once while at a friends house, I played a simple chord progression and within three takes, we had a fine sounding classical tune. I've never played anything classical, and his tastes were more of a 70's classic metal, but my Ovation and his piece o crap made beautiful music. I'll try to put the recording out there, as I don't currently have a web site.
Anyway, my point is this: solo's can be a daunting task, but if your skills are up to par, and you have a hook, either a lyric or a riff, you should play with it until you have something that sounds right. Work with the melody, change it up a bit.
If your looking for the melody, record the rhythm section, and play it over and over and over and... well you get the point. As you listen, let the melody present itself. Learn the relationships between the notes and the underlying harmony. Then try to play what you "hear" within the rhythm.
Sorry for being long winded, hope this helps.