I am expecting my second son. When I found out about the gender this time I did also feel upset I'd never have a daughter (I suppose a fantasy replica of myself), but to be honest, gender roles are pretty fluid, and are changing so quickly, I think you have to ask yourself what you are really grieving for? I think a lot of one's feelings can be quite sentimental/unrealistic at root.
For instance, I think there's this cliche that girls are closer to their families/mothers when they grow up, but when I look at my friends I'd say that a pretty even split of men and women have close relationships to their Mum, largely based on how obnoxious or not they/their parents are :) My own OH is softer than me and communicates better with my family than I do!
Also, with childcare patterns changing (again, among my friends the 'main breadwinner' is evenly split between genders) the whole concern about being the dreaded MIL to wifey with control of baby is also potentially unrealistic
Finally, I think all but the noblest of us expect/presume stuff of our children related to what we ourselves are like - and gender is just the first thing we fixate on and first lesson in the fact children confound our assumptions.
If you're a very brainy couple, having a child that really struggles intellectually can doubtless be a shock - if you are really sporty and expect an intrepid little one to go skiing with you aged 3 but get a really timid, outdoors hating child, likewise.
I'd go so far as to say that if a lot of us who sort of thought we wanted a girl had the choice of oh - but what about a totally unmusical/unbookish/unsporty (put in your own preference) girl or a musical/bookish/sporty boy just like Mummy, we might think again about how important gender really is in relation to our other prejudices....
And the point of ALL of the above though, is that a) being a decent parent is loving the child we get in all their individuality, regardless of whether they are what we expected b) quite often, our unmusical, unsporty boy or whatever not only becomes the apple of our eye, but teaches us wonderful stuff about life that confounds all our expectations....
Anyway, rant over.