Fix exception message to make it according to the function’s new name (parseSAML2Time -> xsDateTimeToTimestamp)
Check that the RegistrationInfo object has the (mandatory) registrationAuthority attribute before serializing.