TAIPEI -- Over the past 20 years, China has leveraged its economic growth and practiced deft diplomacy to craft an image as a responsible member of the global community. More recently, the political chaos of the Donald Trump presidency and Brexit have made China appear to be a steadying presence in a changing world.

But over the past year, the Chinese Communist Party's handling of domestic and international affairs has eroded much of the goodwill it had built up, especially with middle powers such as Canada, Australia and the European Union. The party's missteps have not only undermined China's appeal among those that once viewed it as a counterweight to the U.S., but are also generating pushback.

Last year in Davos, Chinese President Xi Jinping was hailed as the new keeper of the global economic order. This year he was denounced as a grave threat to freedom. This criticism came not from protesters outside the World Economic Forum's exclusive events but from billionaire George Soros, in one of the forum's most widely covered speeches.

While Soros was in Switzerland branding Xi "the most dangerous opponent of those who believe in the concept of open society," China appeared to be engaging in hostage diplomacy with Canada. Two Canadians -- former diplomat Michael Kovrig and North Korea-focused businessman Michael Spavor -- have been detained in China since December. They have not been allowed family or consular visits, raising fears they are being interrogated and possibly tortured.

Canadian Prime Minister Justin Trudeau has called on China to respect judicial procedure and rule of law. Countries including the U.S., the U.K., Germany, France and Australia have voiced support for Canada with regard to the cases.

Another Canadian, Robert Lloyd Schellenberg, who had been sentenced to 15 years in prison for a drug conviction after waiting years for his original trial, was hastily retried and sentenced to death. All this occurred with remarkable speed following Canada's Dec. 1 arrest of Meng Wanzhou, the Chief Financial Officer of China's national tech champion, Huawei Technologies, which like China is seeing its appeal fade in democracies around the world.

The U.S. aside, a growing number of democracies are feeling compelled to confront China, or at least speak up against it. Is this a result of China shifting its approach to diplomacy?

On the contrary, Jorge Guajardo, who spent six years in Beijing as Mexico's ambassador, said, "Rather than a shift, what I have seen is a lack of shift, a lack of adaptation, and therein lies the problem."

"The Chinese have one rule book which they seek to apply to every situation, even though the underlying dynamics may be completely different," Guajardo said.

This is not the first time China has detained Canadian citizens for seemingly retaliatory reasons. In 2014, Chinese security agents seized Kevin and Julia Garratt, who ran a coffee house near China's border with North Korea, on espionage charges. Echoing today's drama surrounding Meng, the couple, who were eventually released, believe their detention was in retaliation for the arrest by Canada of Chinese spy Su Bin for extradition to the U.S.

But Guajardo said Chinese authorities miscalculated when they detained Kovrig, in particular.

"They did not gauge that Michael Kovrig is a former diplomat, known by many of the foreigners who frequent Beijing, and by arresting him they made a whole swath of the China scholars abroad feel targeted," he said.

Indeed, in late January, more than 100 China-focused scholars and former diplomats from Canada, the U.S. and elsewhere signed a letter to Xi, imploring him to release both Kovrig and Spavor.

Scholars and others seeking to build bridges between China and the rest of the world are now more wary of traveling to or engaging China, which "will lead to less dialogue and greater distrust, and undermine efforts to manage disagreements and identify common ground," the letter read. "Both China and the rest of the world will be worse off as a result."

"We welcome normal activities by foreigners in China," said Hua Chunying, spokeswoman for China's foreign ministry, dismissing the letter at a press briefing. "As long as they abide by the law and regulations, they don't have to worry about anything."

Canadians are not the only ones disappearing in China. In late January, Australian national Yang Hengjun was detained by Chinese authorities on spying charges. Relations between Canberra and Beijing have also been frosty as of late. In August, Australia banned Huawei and fellow Chinese tech giant ZTE from involvement in its 5G mobile network.

Australia has been investigating Chinese meddling in its politics as well. One legislator, Sam Dastyari, resigned last year after echoing Chinese talking points on the South China Sea dispute in contradiction of his party's stance, and then getting caught warning Chinese property developer and major political donor Huang Xiangmo that the government had tapped his phone.

Last week, the Australian government surprised Huang by stripping him of his permanent residency and rejecting his long-delayed bid for citizenship. Huang had fallen under increased suspicion due to his ties to the Chinese Communist Party, and the opinion-shaping activities of his Australia China Relations Institute in Sydney.

Huang responded this week by describing Australia as having the "innate characteristics of a giant baby" in an interview with the Global Times -- a Chinese state-run tabloid. "The growth of a giant baby takes time, and Australia still has a long way to go."

Security guards stand at the gates of what is officially known as a vocational skills education center in Huocheng County in Xinjiang Uighur Autonomous Region, China. © Reuters

China -- and Huawei -- are also having difficulties in the EU and the U.K., both of which appear to be leaning away from allowing Huawei's involvement in their 5G networks. If the company is indeed blocked from European networks, the turning point may have come in January, when Poland arrested a Chinese Huawei employee and a Polish erstwhile security official for espionage. Unlike its response to Meng's arrest, Huawei fired the employee, while also denying the accusation of espionage.

Polish officials have taken their case to the EU, which has been growing wary of China for other reasons.

Zsuzsa Anna Ferenczy, a political adviser in the European Parliament, said the body's members generally see China as an "important partner."

"Yet," she said, "a new reality is unfolding, whereby working with China has become more difficult. The House has become increasingly aware and openly concerned witnessing China's willingness to use its economic weight to its own benefit, to the detriment of international norms and values, and most importantly at the expense of European integration."

Parliament members, she said, "recognize that China has become more skillful in influencing EU member states through strategic infrastructure investment and strategic communication, which would undermine the EU's common positions on China."

Other developments, including the March 2018 decision to eliminate the limit of two consecutive terms for China's presidency, the crackdown on Uighurs in Xinjiang and Chinese Christians, and Xi's bellicose message to Taiwan in early January, have all had an impact as well.

"The tone seems to have shifted in the European Parliament toward a more assertive posture, questioning the value of their strategic partnership" with China, Ferenczy said.

Given the unraveling of China's reputation in democratic capitals around the world, one might conclude that Xi and company do not care what other countries think of them and China. Guajardo, the former diplomat, said that is not the case.

"They pretend they don't care, but they do care," he said. "They obsess over China's lack of soft power and seek to burnish it, whether through Confucius Institutes, the Belt and Road Initiative, delegations -- it is all swiftly undone by their ham-handed actions."