Aims. To better understand the phenomenon of colliding winds in massive binary stars, we study the X-ray lightcurve of a WR+O system of the Carina region, a system well known for the high mass of its primary. Methods. Phase-resolved X-ray observations of the massive WR+O binary system WR 22 were performed with the XMM-Newton facility. We observed the object at seven different phases from near apastron to near periastron. Results. The X-ray spectrum can be represented by a two-component, optically thin, thermal plasma model with a first one at a typical temperature of 0.6 keV and a second hotter one in the range 2.0-4.5 keV. The hot component is indicative of a colliding wind phenomenon, but its flux is remarkably constant with time despite the high eccentricity of the orbit. Although surprising at first, this actually does not contradict the results of the hydrodynamical simulations of the wind collision that we performed. When the system goes from apastron to periastron, the soft part of the X-ray flux is progressively lowered by an increasing intervening absorbing column. This behaviour can be interpreted in terms of an X-ray emitting plasma located near the O star, but not fully intrinsic to it, and accompanying the star when it dives into the wind of the WR component. A model is presented that interprets most of the observational constraints. This model suggests that the mass-loss rate ofṀ WR ∼ 1.6 × 10 −5 M yr −1 assumed for the WR could still be slightly too high, whereas it is already lower than other published values. From the comparison of the observed and the expected absorptions at phases near periastron, we deduce that the hard X-ray emitting collision zone should at least have a typical size of 50-60 R , but that the size for the soft X-ray emitting region could reach 244 R if the assumed mass-loss rate is correct. We also present an upper limit to the X-ray luminosity of the WR component that further questions the existence of intrinsic X-ray emission from single WN stars.