Prince William joined Ireland's outgoing Taoiseach Enda Kenny and Princess Astrid of Belgium at the centenary commemoration of the Battle of Messines in Flanders.