Resonant magnetic x-ray scattering study of phase transitions inUPd2Al3