Magnetic structure of EuFe2AS2 as determined by resonant x-ray scattering