Just over six years ago, David Walliams had a brainwave.

“Ideas suddenly ping into your head,” recalls the 43-year-old comedian, who has starred in such widely-loved shows as Little Britain, Come Fly With Me and Big School.

“And the idea that pinged into my head that day was very simple: what would happen if a boy went to school dressed as a girl? I immediately thought, ‘That would make a good children’s book about what it is to be different!’.”

And he was right.

The resulting book, The Boy In The Dress, was published in October 2008 and went on to become an enormous bestseller. Now the children’s novel has been turned into a BBC1 drama and is one of the most eagerly awaited treats in the Christmas schedules.

This one-off drama focuses on 12-year-old Dennis (played by newcomer Billy Kennedy). He is an ordinary schoolboy, but deep down he knows he is different from other children.

His parents divorced when he was young, and he is now being brought up by his struggling single father. But when Dennis glimpses a fashion magazine by chance, his whole world is turned upside down.

He decides to go to school wearing a dress and disguised as a female French exchange student called Denise. If he is rumbled, what will his father, his ultra-strict headmaster and his mates in the football team have to say about it?

David has an hilarious cameo as a camp drama teacher alongside an all-star cast including Jennifer Saunders, Tim McInnerny, Meera Syal, James Buckley and supermodel Kate Moss.

“I felt very flattered to be asked to appear in The Boy In The Dress,” 56-year-old Jennifer told the Daily Express.

“I love David’s stuff. He does so much – I’m constantly in awe of him. What I adore about his writing is that there is no way you can go over the top when you’re performing it. It’s the kind of stuff I love doing – big and funny and touching,” adds Jennifer, who plays French teacher Miss Windsor.

“It has a real, proper message. David makes it cool to be tolerant and different. He’s always saying, ‘Be who you want to be and don’t apologise for the rest of your life’.”

James was equally delighted to co-star in The Boy In The Dress in the role of the PE teacher. The 27 year old is best known as the feckless schoolboy Jay in hit TV series The Inbetweeners.

“It’s amazing to be part of something like this and to get to work with David, one of my comedy heroes,” he says.

BBC versions of Walliams’ books are fast becoming essential Christmas viewing, following successful adaptations of Mr Stink and Gangsta Granny during the past two festive seasons.

David hopes that The Boy In The Dress will strike an equally emotional chord this Christmas.

“It’s a very warm story about family and togetherness. Dennis’s family has become splintered. His mum is absent, and Dennis doesn’t communicate with his dad. But by going on an extraordinary journey, Dennis manages to bring his family together.

“What could be a better message for Christmas than that?” David smiles.

The Boy In The Dress, BBC1, Boxing Day, 6.55pm

Watch a preview clip below