Rupert Murdoch’s relationship with Beijing started on the wrong foot. The Australian-born mogul declared in 1993 that satellite-television networks, like the Hong Kong–based Star TV venture that he had purchased, would pose "an unambiguous threat to totalitarian regimes everywhere." Since then he has danced more carefully to Beijing’s tune. Soon after his provocative comment, China’s leaders insisted that he remove the BBC from Star TV’s menu of channels after it aired a program critical of Chairman Mao Zedong. Murdoch complied, and has gone further since. On his orders, News Corp.’s publishing arm, HarperCollins, dropped a book written by Chris Patten, Hong Kong’s last British Governor, in which Patten was critical of Beijing. In 1999 Murdoch even derided the Dalai Lama, Beijing’s longtime foe, as "a very political old monk shuffling around in Gucci shoes." News Corp. hired an American adviser last year to help China’s state-run TV station spruce up the propaganda on its English channel, which is carried on News Corp.’s DirecTV (as well as Time Warner cable systems).

All that goodwill, however, isn’t paying off. Murdoch was testing the legal boundaries in China, where foreign TV broadcasters cannot distribute their programming without government permission. Uniformed officers raided News Corp.’s Beijing offices in June and confiscated financial records and equipment. Calling the investigation a "big and serious case," the government is focusing on a company registered to News Corp. employees with regard to its role in leasing satellite-TV channels in China. And China’s State Administration of Radio, Film and Television terminated a deal that put News Corp. programming on a nationwide satellite channel based in the remote Qinghai province. Executives at Hong Kong’s Star TV, a subsidiary of News Corp., declined to comment.

China is under no obligation to allow foreign broadcasters to operate, and by tightening regulations across the board, President Hu Jintao has shown his wariness about opening China’s living rooms to Western culture. Multinational media companies are salivating over the $3.4 billion in TV advertising carried on networks in China last year, only 6% of which went to foreign firms, according to Vivek Couto, a Hong Kong–based media consultant. But government restrictions limit some News Corp. channels to the southern Chinese city of Guangzhou, luxury hotels, top government offices and approved apartment buildings. (Time Warner, owner of TIME, sold its controlling stake in a channel that also broadcast to Guangzhou in 2003.) Meanwhile, Beijing has left Disney in the cold by refusing to approve any more foreign satellite channels for even limited distribution. The government now requires pre-air approval for all foreign shows. Viacom last year announced a deal to produce children’s programming but hasn’t got approval yet. Now problems at News Corp., says a top Asia executive for a U.S. media company, "will spoil the soup for everyone."

News Corp.’s efforts to climb through loopholes in China were brazen, according to Jiang Hua, a former News Corp. distribution manager in China. Despite regulations forbidding direct sales, Jiang, who left the company 18 months ago after a disagreement with his boss, says he distributed News Corp. channels ranging from National Geographic (in which it has a stake in Asia) to an MTV-like music channel called Channel V. Two former News Corp. executives confirm Jiang’s story. Buyers were cable-TV networks from the Tibetan Plateau to the South China Sea. "News Corp. called what I did gray-market distribution," he says, "but it wasn’t gray. It was black."

Jiang says payments were channeled through a shell company, Beijing Hotkey Internet, which received nearly $1.5 million a year in illicit payments from cable operators starting in 2002. Jiang and another former News Corp. employee told TIME that cable operators occasionally paid with briefcases of cash. News Corp.’s relationship with provincial broadcaster Qinghai Satellite Co. was similarly opaque. It involved a company, Runde Investments Corp., that had as an investor Ding Yucheng, the son of former hard-line Communist Party Propaganda Minister Ding Guangen. Runde Investments helped deliver News Corp.’s programming to Qinghai Satellite, which had not received the government’s approval to broadcast the shows, according to two former News Corp. employees with knowledge of the deal. Registration documents obtained by TIME show that Ding holds a 15% stake in Runde Investments.

Many foreign executives in China have hoped a political princeling might serve as a sort of insurance policy against regulators. "If you don’t push the rules," says a former News Corp. employee, "the government won’t respect you, and you won’t get anything done." But it may turn out that even in China’s freewheeling marketplace, bending the rules can put you in danger of a backlash.

Why eBay Must Win China?

The potential is enormous. But Alibaba’s deal with Yahoo! is a huge threat.

For all its reputation as the city of tomorrow, a place that will marry capitalism and cool as effortlessly as New York City or London, the city of Shanghai, truth be told, is not a particularly pleasant place during the summer. It’s a steambath, and when the occasional typhoon blows through, it will rain for three days nonstop. Many of the streets simply reek as garbage rots in the oppressive heat. Most people, if they have a choice, try to avoid Shanghai this time of year.

Meg Whitman would not be among those people–at least not this summer. If, in fact, the CEO of eBay, the world’s most famous and successful e-commerce company, had to write an essay this fall titled "How I Spent My Summer Vacation,” it might begin, "I didn’t have one. I went to Shanghai instead, trying to figure out the China market, because my company’s future may depend on it."

In February, Whitman said that for eBay, "market leadership in China will be a defining characteristic of leadership globally." Lots of big-time CEOS say things like that these days. Few follow it up by summering in Shanghai. The company cast Whitman’s stint in China as business as usual. "She goes there quite a bit [but] it’s not too extraordinary," says Matt Bannick, president of eBay’s international division. "You know, Meg travels a lot." Whitman, in an e-mail interview with TIME, says, "China is unique. It is growing rapidly, and it has a tremendous amount of potential, which is why we have made it a priority for the company."

Yet her Shanghai sojourn is not business as usual to anyone who is anyone in the booming e-commerce market in China. That includes the CEO of the local company giving eBay fits there, Yun (Jack) Ma of Alibaba-Taobao. On Aug. 8, the Alibaba-eBay competition ceased being a David vs. Goliath battle. Ma announced he was selling a 40% stake in his company to Yahoo! for $1 billion.

"We welcome her and the eBay team to China, and with this Yahoo! deal, we decided to give them a nice big welcome gift," Ma says puckishly. The move instantly transformed the pivotal fight for the e-commerce market in China into a high-profile showdown between two of the most successful companies of the Internet age. "The competition [for the China market] will be fierce, no doubt about it," says Yahoo! co-founder Jerry Yang, who has been friends with Ma for years.

Ma says he and Yang started talking seriously about a deal in May. The key to it, Ma says, is that it gives Alibaba a strong position in four growth segments: business to business, consumer sales, online payments and now, with Yahoo!, search. "When we started Taobao, even our own chief technology officer said, ‘Jack, you are crazy. Don’t forget eBay.’ But we passed eBay in China in just two years." Whitman, for her part, could not have been surprised by Yahoo!’s entrance into China. "Given how quickly the Internet and e-commerce market is exploding in China, you would expect to see a number of players staking claims, which is exactly the case," she told TIME.

On Aug. 5, a search-engine outfit called Baidu, a.k.a. China’s Google, launched an IPO in the U.S. The stock was initially priced at $27–and closed at $122.54 after its first day of trading, a move that evoked nothing if not the infamous dotcom bubble of the 1990s. Except that no one believes China’s Internet boom is a bubble, given that there is so much potential growth.

The critical importance of eBay’s international growth, and of China’s piece of that growth, couldn’t be clearer. In just a decade, eBay has gone from America’s online flea market–purveyor of old 45s, Happy Days lunch boxes and Pez dispensers–to a global powerhouse, with footprints in no fewer than 32 countries. In fact, in the first quarter of 2005, the number of registered eBay users abroad exceeded that at home. According to John Yunker, president of Byte Level Research, "by 2006, and perhaps even by the last quarter of this year, non-U.S. revenue will surpass U.S. revenue." That’s because eBay’s revenue growth is slowing in the U.S. as the market matures (last year domestic revenues grew 34% to $1.89 billion) and because its international growth has been extraordinary. eBay’s gross-merchandise volume (GMV)–the total dollar value of the deals done on a given website–in Britain, France and Italy all increased 100% or more last year. Consider that in 2000, eBay’s international revenue totaled $29 million. By 2004, that figure was $1 billion.

For some time, it was simply a given that eBay would take China by storm as the online marketplace exploded, that it would be, as Bear Stearns analyst Robert Peck puts it, a "layup." In 1999, Shao Yibo, a Harvard Business School graduate, started EachNet, an e-commerce company, in China. Shao’s site openly aped eBay in style and content, effectively screaming "buy me" at the San Jose, Calif., giant. In 2002 eBay complied, paying $30 million for a third of the company and taking the rest for an additional $150 million the following year. This, arguably, was a hefty price for a start-up in a market in its infancy, but that was hardly the point. China is on its way to having 200 million Internet users. E-commerce is surging, and dotcom companies in general are back in favor. Wildly so.

But eBay’s dominance of the next great e-commerce market has turned out to be anything but a layup. Even before the massive capital infusion from Yahoo!, Alibaba-Taobao was making life unexpectedly difficult for Whitman & Co. Ma, 40, is a former English teacher turned Internet pioneer in China, where he started a company that provided basic information about Chinese industrial companies on the Web back in the mid-1990s. In 1999, he launched Alibaba, a business-to-business site that last year did about $70 million in sales and became profitable in 2002. A year later he started Taobao–"searching for treasure" in Mandarin–and he plainly reveled in playing David to Whitman’s Goliath. He gleefully tells of being shut out of eBay Live, the company’s annual gathering of members of its e-commerce "community,” because many sellers use Alibaba as a supplier. "We were going to eBay Live to make love, not war, and they canceled us," he says. "Can you believe that?"

Believe it. According to Alexa.com a market-research site tracking e-commerce, Taobao has surged in front of eBay by a variety of measurements. As of Aug. 1, Taobao was reaching 15,800 out of every 1 million Internet users, compared with just under 10,000 for eBay China. The number of page views per user–a measure of interest in the site–was 10.7 for Taobao vs. 7.4 for eBay. Most analysts agree that GMV is also a reasonable standard of performance. In the first quarter of this year, Taobao announced $120 million GMV vs. $90 million for eBay. In the second quarter, Taobao claimed $200 million, while eBay withheld its China data, claiming its competitors were distorting the numbers. "We didn’t distort anything," says Porter Erisman, Taobao’s vice president for corporate marketing. "We just beat them."

For eBay, it’s clear the game has only just begun. The company is sinking an additional $100 million into China this year–much of which is going to marketing. eBay ads are ubiquitous on buses in Shanghai and other metro areas, as are its television commercials and online ads as well as other, quirkier promotions. At many popular karaoke bars in Shanghai, for example, customers get an hour of singing and drinking for free if they register as eBay users. The brash Ma mocks these efforts, claiming he canceled his marketing budget in the first half of this year when he discovered how much eBay was spending, figuring that "their ads were just expanding the e-commerce pie for everybody."

That could turn out to be wishful thinking. The same Alexa.com data that put Taobao in front also show a distinct narrowing of the gap. The reach-per-million-users data, for example, have Taobao’s users down 6% over the past three months, while eBay’s are up 32%–arguably a sign that what Taobao’s Erisman sarcastically calls the "shock and awe" marketing campaign is having an effect.

eBay has rolled out its standard support system for big-time sellers in China. Education sessions are available once or twice a month at "eBay University," and what seller Wu Lin, who runs a full-time business selling clothing on the site, calls "excellent customer service" helps maintain customer loyalty. "If I have a question, they answer it," she says. eBay has finally introduced its secure online-payment system–PayPal. Alibaba-Taobao started its version, Alipay, earlier this year–something that has benefited it significantly in all overseas markets. Wu says she has "looked at Taobao, but I see no reason to leave eBay at this point."

Whitman knows Taobao doesn’t charge sellers to list items on its site, but that won’t be the case next year, as Ma acknowledges. eBay believes that will be a game changer, even if the alliance with Yahoo! makes Taobao’s pockets that much deeper. But a link with Yahoo! gives Ma the capital and technology he needs to battle eBay on its terms. "Meg made a big mistake coming here," he says with a smile. "I respect her for doing so, but the chief commander shouldn’t be at the front line with the troops. It just causes confusion and panic."

Nice try, Jack. Whitman is in China because she knows the cost of failure could be astronomical. In 1999, technical problems delayed eBay’s roll-out in Japan. That allowed Yahoo! to get a jump on the online shopping business in what has become the second largest e-commerce market in the world–a lead it has never relinquished. eBay pulled out of the market entirely in 2002, a move Whitman has rued ever since. She is not about to let the Japan debacle be repeated anywhere else, especially China; nor is it probable that she wants to spend another summer in stifling Shanghai. With reporting by Austin Ramzy/ Hong Kong and Regine Wosnitza/Berlin