At the Southern Cathedral here, where more Chinese workshipers have begun to appear in the last few years, an American visitor sat next to men he described as "two old guys in ragged clothes who looked like shepherds."

Neither had a missal to follow the service, for religious books are not yet printed in China. "But they were rattling off the litany of the saints, in Latin," the visitor said. "You have to say the names of more than a hundred saints, in a certain order, but they knew it by heart."

This past week, with a second precedent-shattering visit to China by a Roman Catholic cardinal, talk of the Christian church in Chinese life has risen again in Peking's small foreign community and in its probably only slightly larger community of avowed and underground Chinese Christians.

Cardinal Franz Koenig, archibishop of Vienna and head of the Vatican's Secretariat of Nonbelievers, had an animated chat with Michael Fu Tiechan, the new bishop of Peking. Koenig and Fu, both tall, distinguished churchmen, spoke in Latin.

Koenig later complimented Fu on his command of that language, but neither Fu's consecration as bishop in December nor his All-Chinese Patriotic Catholic Association have been recognized by the Catholic hierarchy in Rome.

Koenig told a press conference later "I don't see any immediate solution to this problem," for the Chinese authorities do not seem ready to allow their small community of Catholics to reestablish ties that were severed from the Vatican in 1958. There is also the problem of the Vatican's continued diplomatic relations with Taiwan, the independent Chinese island governed by people Peking considers to be rebels. The Vatican has left open its ambassadorship and cardinal's seat in Taiwan, but that is not enough to satisfy Peking.

Still, the visits by Koenig and French Cardinal Roger Etchegaray this month provide an important sign of Peking's steadily relaxing attitude toward religious life of Chinese and relations with foreign clerics, men whom the Communist Party has accused in the past of helping imperialism ravage the old China.

Both cardinals were met by Ulanhu, the Mongolian on the ruling party standing committee who deals with problems of China's minority groups. The invitations to the two men appeared to be a clear response to Pope John Paul II's statement last summer that he wished to restore the "perfect union of China and the Holy See by "every means possible."

Despite the amount of time and money spent here by Christian missionaries before 1949, Western religions never won a following in China as large as that enjoyed by Buddhism, or even Islam. In 1949, by some estimates, there may have been 2 million Roman Catholics and perhaps another million Christians of other denominations in China.

Fu told Koenig "several thousand" Catholics are now in the Peking area, but no official estimate is available. Perhaps as many as 300 to 400 Chinese attend services at the Southern Cathedral on Sundays.

During Fu's December consecration ceremony, the cathedral was packed with at least 500 Chinese. Several hundred apparently homemade rosaries sold out within minutes at a price of about 33 cents each. After the ceremony, Fu came out to talk to scores of Chinese who had stayed behind.

"I prayed for the motherland, the four modernizations [the name of China's economic program] and for workers of every belief," he told them. Then an aide told the listeners they could kiss the bishop's ring and many rushed up to do so.

One man recognized a woman late-comer and pulled 20 rosaries he had bought out of his pocket. "You came too late," he said. "Look what they were selling today."

The woman seemed stunned: "My Dog," she said. "I haven't seen one of those in 20 years."

The Chinese constitution allows freedom of religion, but avowed Christians have little chance of advancement. The percentage of believers has in any case been small, compared to the number of Christians in a socialist state such as the Soviet Union. Peking apparently has come to recognize that it has little to fear from letting people workship in public.

As fas as is known, however, some Chinese priests arrested after the 1949 communist victory, including some bishops, are still under detention. Koenig, asked about them, said he had no opportunity yet to inquire about them.

Those priests allowed to lead services openly declared their loyalty to the Chinese government, despite its official atheism. Their parishioners seem mostly middle-aged and elderly, but some Chinese in their twenties who seem to know the prayers turn up at the Southern Cathedral and at Peking's Protestant church.

A foreign resident seeking to arrange a baptism for his child recently born here got the impression that the Chinese priest he spoke to had done many baptisms before, and not just of foreign children.

For now, however, the government prefers to deal with religion as an academic exercise. Koenig was invited to address the Chinese Social Sciences Academy on "the future of relgion." The cardinal said he pointed out to his small audience how Christianity had had managed to survive in many Marxist states and suggested it would continue to do so.