Setting aside their differences over the current agenda in U.S.-Soviet relations, Secretary of State George P. Shultz and Soviet Foreign Minister Andrei Gromyko today praised the big-power agreement that restored Austria's independence after World War II and called for similar cooperation to produce a successful outcome of the Geneva arms talks.

During ceremonies marking the 30th anniversary of Austria's State Treaty, Shultz and Gromyko recalled the 10 years of arduous talks among the wartime allies that finally culminated in 1955 in the withdrawal of all foreign troops and the emergence of a neutral, sovereign country between East and West.

"This showed that negotiations can solve even the most complicated problems," Gromyko said in a brief speech. "All that is needed is realistic good will by those involved."

His conciliatory comment was echoed by Shultz, who said the treaty was not a triumph by one side over the other, "but a victory for all -- a victory for reason and peace."

Shultz said it proved that when governments in East and West "sit down . . . without illusions and with sufficient patience, we can find ways to work together for the benefit of all concerned."

Shultz warned, "We should not forget the time it took us to reach agreement," and he noted that many "condemned the negotiators as foot-dragging bureaucrats."

"Yet in the end patience was rewarded with success," he said. "This is a lesson we hope to see repeated in our negotiations with the Soviet Union here in Vienna and in Geneva."

Most historians see the 1955 treaty as resulting less from years of negotiations than from a sudden change of strategy on the part of the Soviet Union in the aftermath of Joseph Stalin's death in 1953. The establishment in 1954 of the North Atlantic Treaty Organization made a neutral Austria far more attractive to the Soviets than one three-fourths in western hands. In addition, Nikita Khrushchev, who was just coming into full power, was eager for a Geneva summit meeting with Dwight Eisenhower as a diplomatic image-building measure and approval of the Austrian treaty removed the final barrier to the summit.

The U.S. and Soviet foreign ministers were speaking today, along with their counterparts from France and Britain, as representatives of the four wartime allies that occupied Austria from mid-1945 until the terms for its sovereign status were secured in 1955.

The Austrian government also invited the foreign ministers from seven neighboring countries belonging to both blocs to attend today's anniversary ceremony, held in Vienna's baroque Belvedere Palace.

Austrian Chancellor Fred Sinowatz said the event was being commemorated "not as an act of self-congratulation, but rather as a solemn political reaffirmation that defines our role as a neutral state between East and West."

The restoration of Austria's independence, he said, was "a turning point in international relations because confrontation ended and detente began."

Shultz and Gromyko, who held six hours of talks Tuesday at the Soviet Embassy here, also held a brief, unscheduled conversation today. The discussions reportedly yielded little, if any, progress on arms control issues or the setting of a time and place for a summit meeting between President Reagan and Soviet leader Mikhail Gorbachev.

Shultz and Gromyko also used today's forum to reiterate positions that remain key sources of conflict between Moscow and Washington.

Gromyko condemned the "insanity of the nuclear arms race" and the risk posed by space-based weapons, along with Reagan's Strategic Defense Initiative.

He also cited relations between Moscow and Vienna as an example of how different social systems can cooperate in their joint interests.

Shultz extolled Austria's open-door refugee policy for sheltering "the victims of oppression and misfortune in other lands." He described the Soviet Jews who have passed through Austria as "innocent victims of religious persecution."

Austria won Soviet approval for the 1955 treaty after assuring Moscow that it would enact a constitutional provision committing the state to perpetual neutrality. In exchange for lucrative oil assets and Danube shipping rights, the Soviets dropped claims for war reparations.