Italy's Ansaldo resolves rail contract dispute