In any action in court, or before the department, brought against a railroad corporation for the purpose of enforcing rights arising under the provisions of this and sections 327D.3 and 327D.4 the burden of proving that the provisions thereof have been complied with by such railroad corporation, shall be upon such railroad corporation.