Here's a question of potential interest to more than a few musical-theater archivists. Four years after Richard Rodgers and Oscar Hammerstein wrote "The King and I" and four years before they created "The Sound of Music," what on earth were they thinking?

Thanks to near-heroic restoration efforts and New York City Center's Encores!, we can now imagine some of the anguish through which the men must have put themselves before the 1955 opening of an uneasily goofy musical-comedy hodgepodge and wan romance called "Pipe Dream."

Although the show ran an inconceivable 246 performances, we're told this was the first R&H work that didn't return money to investors. Little wonder. For starters, the team had to keep elevating the style and vocal keys for Helen Traubel, the Wagnerian opera star, to play the earthy bordello madam. Even more obvious here, the subject -- happy hookers and jolly bums on John Steinbeck's Cannery Row -- was palpably not a comfort zone for artists revered for their serious musical-play masterworks.

Of course, "All at Once You Love Her," the only song remembered from the show, is gorgeous. Rodgers' music is typically polished and tuneful, but you can hear it yearning for the inspiration from "Oklahoma!" and "Carousel." Worse, Hammerstein seems so worried about sanitizing the sex and vagrancy that he neglects dramatic tension, emotional logic and interesting characters.

A penniless but philosophical scientist (the ardent Will Chase, currently of "Smash") is derailed by the arrival of Suzy, a down-and-out wanderer with low self-esteem (Laura Osnes, her luscious voice and bland elegance again miscast as a tough girl with blue-collar pluck). She is taken in by the kindly madam -- played here with gusty composure, and in the original keys, by the excellent Leslie Uggams.

The flophouse denizens are led by the delightfully reliable Tom Wopat and are menaced by a landlord named, no kidding, Joe the Mexican. In director Marc Bruni's hokey-cutesy production, the prostitutes wear sweet little skirts and kimonos and there's even a Brunhilde sight gag in one of the many dance scenes.

Instead of digging into psyches, Hammerstein dwells on feel-good lyrics that anthropomorphize days of the week and sunshine, or coo that everyone -- even starfish and octopuses -- is interesting to someone. Love finally blossoms near a pipe, really, that leads to the boiler room where Suzy has gone to live. Such is the thin stuff this pipe dream is made of.