After swallowing some bitter pills,

Electronic Data Systems

(EDS)

is tasting something sweet for a change.

EDS is savoring a big contract victory against rival

Lockheed Martin

(LMT) - Get Report

. The company -- which has wound up on the losing end of some other major deals in recent months -- said on Monday that it prevailed it its efforts to keep a $750 million contract with the U.S. Department of Housing and Urban Development (or HUD). EDS originally won the contract a year ago but found itself fighting to keep it after Lockheed argued that it had submitted the lower bid. Government officials halted the project and ordered new bids shortly afterwards.

EDS' stock inched up 12 cents to $16.84 on the favorable news. And one EDS bear even offered a few encouraging words.

"If it's a $750 million contract, that's clearly a big deal," said Bob Djurdjevic, an industry analyst at Annex Research with no position in the stock. "And if it was in dispute, it's a net positive for EDS. ... But it's interesting how companies only disclose things that were bad after they become good."

EDS was first retained last summer to provide computer services to some 18,000 HUD users in more than 80 locations, said company spokesman Bill Ritz. But the project has been idled since late last fall, he said. Now, he added, EDS employees are "looking forward to rolling up our sleeves and helping our customers."

Top company leaders were quick to celebrate the contract win as well.

"It has been a long and arduous process, but the new award by HUD reaffirms that EDS offered the superior solution -- twice," said Jim Duffey, vice president of global sales and client solutions for U.S. government contracts. "We all look forward to getting back to the task of providing immediate and sustained modernization to support the HUD mission objectives."

News of the resolution comes at a time when EDS is struggling mightily with an even larger government contract. The company has spent years missing deadlines -- and bleeding cash -- on a multibillion-dollar project for the U.S. Navy.

Last month, that contract caused EDS to once again lower its expectations. Indeed, the company has finally stopped guessing when the contract will start generating positive cash flow. And UBS analyst Adam Frisch wonders if it ever will.

But Frisch saw other signs of trouble in the company's latest results as well.

"Perhaps the most concerning development is the potential inability of the core business to generate any material free cash flow growth in 2005-06 due to the lack of new bookings/organic growth and the potentially significant loss of

GM

(GM) - Get Report

revenues," wrote Frisch, who has recommending the sale of EDS's stock longer than most.

EDS currently counts General Motors, its former parent, as its largest single client. It has already lost a considerable amount of GM business and could lose even more during contract negotiations next year.

Frisch believes that EDS enjoys particularly strong profit margins and cash flow from this mature business. And Djurdjevic says vendors are already lining up to compete for a piece of that pie.

In the meantime, he notes, EDS continues to face setbacks with other clients. For example, he says, British television company BSkyB plans to sue EDS over a $112 million contract it terminated with the company in 2002. He also points out that EDS recently lost a major contract with

Dow Chemical

(DOW) - Get Report

to rival

IBM

(IBM) - Get Report

and, on the same day, weathered a fresh round of bad publicity when a computer glitch grounded flights for two of its airline customers.

"When it rains, it pours," Djurdjevic declares.

Moreover, Djurdjevic remains convinced that EDS is more troubled than some might think. Notably, he doubts the growth figures that EDS recently reported to investors. He insists that the company is still digging itself out of last year's hole, when new contracts plummeted, instead of actually growing the company. Even with "add-on business" from existing clients -- and help from currency exchange rates -- Djurdjevic says he can't figure out how EDS managed to post a recent jump in revenue. He also doubts that EDS, which has lost money during the first half of this year, can keep its promise to end 2004 in the black.

"Maybe some gullible Wall Street analysts or investors are lapping up such rosy forecasts and turning them into their own 'feel good' fables," he said. "But count us out. Short of deploying some accounting 'black magic,' we think EDS would be lucky to reach $20 billion in revenues this year

below the consensus estimate and to turn any profit at all."