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.