The Duchess of Cambridge told a soldier that she would like her baby to be a boy at today's St Patrick's Day parade at Mons Barracks in Aldershot.
But Kate, who is five months pregnant, said that the Duke, who attended the event with her, would prefer to have a girl.
Guardsman Lee Wheeler said: "I was talking to her about the baby. I asked her 'do you know if it's a girl or boy', and she said 'not yet'.
"She said 'I'd like to have a boy and William would like a girl'. I asked her if she had any names yet and she said no. I said I suppose you've got to stick to traditional names."
Guardsman Jason Perry, 33, also spoke to Kate about her pregnancy.
He said: "I wished her congratulations and said I hoped everything is fine. She said 'yes it is'
"I asked her if she was excited to be having her first child. She said 'very'."
The soldier said it was "absolutely brilliant" to meet the couple and they had both asked him about his 13-and-a-half year career in the Army, which has seen him serve two tours of Iraq and one in Northern Ireland.
More top news
Mostly dry and bright this afternoon with cloud building and rain arriving from the west later.
A risk of heavy downpours in parts of Kent this afternoon. Elsewhere, mostly dry with sunny spells.
Thunderstorms and heavy downpours caused flooding across the Meridian region yesterday. Some residents have been evacuated from their homes.