Soliton interaction in a nonlinear waveguide in the presence of resonances.