Well, soloing, no matter the genre, is simply playing a melodic part. Now in the context of most rock, blues, jazz, etc. it's generally at least supposed to be improvised, but not always. And how do you learn to do that? By listening to great solos, learning how to play them, AND using your ever-expanding understanding of theory to understand why it works- both when the soloist is following the "rules", and when they break them.
So, I suggest learning solos by great soloist, no matter the instrument. Face it, most bass players aren't great soloists because we spend our lives defining the harmony instead of embellishing it. So, first, listen to soloists who are NOT BASS PLAYERS. I'd even go further and say avoid guitarist too at first. Learn from Louis Armstrong, Patti Cathcart, Ella Fitzgerald, Beverly Sills, Charlie Parker, Renee Fleming, Yo Yo Ma, Paul McCartney (the singer), etc. etc.
Take in all the music you hear, and make sure you hear a lot of different musics. Then to solo, sit down with the progression over which you're soloing, and SING a solo that sounds good to you. The best way is to put your bass away when you do this. Just sing. That'll be YOUR voice, not the bass' nor the accumulation of influences you have from playing bass. Record your vocal solo. Then learn it note-for-note on bass, getting all the nuances.
It's hard, it's tough, it's demanding. But it's how you become a great soloist, instead of the annoying bass soloist who gives rise to the old joke about when the drumming stops.
jte