Determination of the longitudinal and transverse cross section in resonance electroproduction