The supersonic stellar and disk winds possessed by massive young stellar objects will produce shocks when they collide against the interior of a pre-existing bipolar cavity (resulting from an earlier phase of jet activity). The shock heated gas emits thermal X-rays which may be observable by spaceborne observa- tories such as the Chandra X-ray Observatory. Hydrodynamical models are used to explore the wind-cavity interaction. Radiative transfer calculations are performed on the simulation output to produce synthetic X-ray observations, allowing constraints to be placed on model parameters through comparisons with observations. The model reveals an intricate interplay between the inflowing and outflowing material and is successful in reproducing the observed X-ray count rates from massive young stellar objects.