Jack Haley, 79, who played the shy and diffident Tin Woodman in the film classic "The Wizard of Oz," died yesterday at the UCLA Medical Center in Los Angeles after a heart attack.

Mr. Haley was a song-and-dance man who appeared in vaudeville, on Broadway and in about 50 films in a career, which began when he was 6 years old. In recent years he had devoted himself to a successful real estate business and to helping other performers who were less well-off.

But he is best remembered for his role in "The Wizard of Oz," a marvellous musical fantasy about a little girl, Dorothy, played by Judy Garland, who wanted to get back home to her farm in Kansas. After a tornado, she finds herself in the land of Oz, where the only person who can tell her how to get home is the Wizard, who was played by Frank Morgan.

Dorothy meets the Tin Woodman, - more popularly known to the public as the Tin Man - who wants a heart, the Cowardly Lion, played by Bert Lahr, who wants to be courageous, and the Straw man played by Ray Bolger, who wants a brain. Together they set off ther they set off down a brain. Together they set off down the Yellow Brick Road "to see the Wizard, the wonderful Wizard of Oz," in the Emerald City.

The Wizard solves their problems and Dorothy learns that she can find the happiness she wants in her own backyard.

Mr. Haley's last film appearance was a small part in "Norwood," which was released in 1972 and which was directed by his son, Jack Jr.

His last public appearance was at the Academy of Motion Picture Arts and Sciences presentation of the Oscars in April. He and Ray Bolger made one of the awards. The program was produced by Jack Haley Jr.

Mr. Haley was born in Boston on Aug. 10, 1899. He began his career at the age of 6 as a singer. When he was 18, he went to New York, plugged songs, and went into vaudeville, where he met Florence McFadden. She became his wife and they were married for 52 years. He made his Broadway debut in "Around the Town."

His first film was "Good News" in 1928. Beginning in 1930, he stayed in Hollywood and became a star at 20th Century-Fox. His credits included "Poor Little Rich Girl," with Shirley Temple, "Pigskin Parade," with Jack Oakie and Judy Garland, "Rebecca of Sunnybrook Farm," "Thanks for Everthing" and "People Are Funny."

Mr. Haley's own favorite among his pictures was "Wake Up and Live," in which he introduced the hit song "Never in a Million Years."

His son and Liza Minelli, Judy Garland's daughter, were married for four years.

Mr. Haley said that one of the sadnesses of his life was the death of Miss Garland in 1969.

"She never got love and discipline," he once said. "It broke my heart.Dorothy in 'The Wizard of Oz' was a kind of symbol. The whole substance of the film was the belief that Dorothy wanted to get home. That's why it had such great appeal."

Asked about his property and his work in behalf of the American Guild of Variety Artists, a union he once headed, and in behalf of less fortunate performers in recent years, Mr. Haley once said, "You can't be happy here if you don't see any hope for people who are suffering, impoverished and in pain. Who am I to be so fortunate? My being so lucky, I want to give some of it back."

In addition to his son, Mr. Haley's survivors include a daughter, Gloria Radovich, and two grandchildren. CAPTION: Picture, Jack Haley, in his role as The Tin Woodman in the 1939 film, "The Wizard of Oz." AP