  (abridged) We have performed a set of phase-resolved X-ray observations of
the magnetic B star Beta Cep, for which theoretical models predict the presence
of a confined wind emitting X-rays from stationary shocks.
  We obtained four observations spaced in rotational phase with XMM-Newton and
with Chandra. A detailed analysis of the data was performed to derive both
photometric and spectral parameters from the EPIC data, searching for
rotational modulation, and to derive the location of the X-ray plasma from the
line ratios in the He-like triplets of N, O and Ne from the RGS data. The LETG
data were used to constrain the presence of bulk motions in the plasma.
  The strong rotational modulation predicted by the early, static magnetically
confined wind model for the X-ray emission is not observed in Beta Cep. The
small modulation present goes in the opposite direction, pointing to the
absence of any optically thick disk of neutral material, and showing a
modulation consistent with the later, dynamic models of magnetically confined
wind models in B stars. The lack of observed bulk motion points to the plasma
being confined by a magnetic field, but the low plasma temperature and lack of
any flaring show that the plasma is not heated by magnetic reconnection.
Therefore, the observations point to X-ray emission from shocks in a
magnetically confined wind, with no evidence of an optically thick, dense disk
at the magnetic equator
