RIO DE JANEIRO - China Ocean Shipping Co and Thailand’s BJC Heavy Industries Plc have won a contract to build 24 natural-gas compressors for six oil platforms being built by Brazil’s Petrobras and its partners in two giant offshore oil areas, one of those partners said on Wednesday. Cosco and BJC beat out other foreign companies for the work after Petroleo Brasileiro SA, as Petrobras is formally known, canceled an existing contract with Brazilian shipyard IESA in Rio de Janeiro, said Carlos Alves, president of the Brazilian unit of Portugal’s Galp Energia SGPS SA. No price for the contract was given. The decision to use only foreign contractors met resistance from unions and Brazilian industry, fostering complaints that Petrobras may be breaking tough national-content rules. The decision to look abroad, though, was made in part because many potential Brazilian replacements for IESA were banned from bidding because of the corruption scandal surrounding Petrobras. “IESA had financial problems and was forced to cancel the contract, and we managed to find new suppliers through an international tender,” Alves told reporters after an event in Rio de Janeiro. Galp owns 10 percent of BM-S-11, home to as much as 8 billion barrels of recoverable oil in several fields. Petrobras owns 65 percent and is the operator, and Britain’s BG Group Plc owns 25 percent. BG is in the process of being taken over by Royal Dutch Shell Plc. The compressors will be installed on floating production, storage and offloading ships known as FPSOs that will serve the Lula, Berbigão, Sururu, and the Oeste de Atapu fields. Sururu, Berbigão and Oeste de Atapu were part of the Iara prospect before being declared commercially viable in December.