Dynamic Analysis of Railway Bridges by Means of the Spectral Method