BOAO, China — The International Monetary Fund chief praised his openness. A senior British banker lauded his authoritarian rule. The Philippine president said he loves the man.

President Xi Jinping of China took center stage at his country’s annual Boao Forum for Asia this week to the welcoming arms of many in the global elite. He portrayed himself as a champion of free trade and world order, speaking to a group that included Ban Ki-moon, the former secretary general of the United Nations, and Pascal Lamy, the former director general of the World Trade Organization, and his words helped move markets around the world.

The forum, held every year on the southern Chinese island of Hainan, has long been a platform for China to portray itself as an economic powerhouse and regional leader.

But this year’s meetings took on an elevated role, as a platform for Beijing, a result of a growing trade dispute between China and the United States. It was an opportunity for Mr. Xi to present himself as a foil to President Trump, who has rejected globalization and focused on an “America First policy,” targeting China, in particular, with a series of protectionist moves.