/// <summary>
        /// The process response.
        /// </summary>
        /// <param name="returnType">
        /// The return type.
        /// </param>
        /// <param name="registration">
        /// The registration.
        /// </param>
        /// <param name="exception">
        /// The exception.
        /// </param>
        private void ProcessResponse(
            SubmitRegistrationResponseType returnType, IRegistrationObject registration, Exception exception)
        {
            var registrationStatusType = new RegistrationStatusType();
            returnType.RegistrationStatus.Add(registrationStatusType);
            registrationStatusType.StatusMessage = new StatusMessageType();
            this.AddStatus(registrationStatusType.StatusMessage, exception);
            if (registration.DataSource != null)
            {
                var datasourceType = new DatasourceType();
                registrationStatusType.Datasource = datasourceType;
                this.AddDatasource(registration.DataSource, datasourceType);
            }

            if (registration.ProvisionAgreementRef != null)
            {
                ICrossReference provRef = registration.ProvisionAgreementRef;
                var provRefType = new ProvisionAgreementRefType();
                registrationStatusType.ProvisionAgreementRef = provRefType;
                if (provRef.TargetUrn != null)
                {
                    provRefType.URN = provRef.TargetUrn;
                }
            }
        }
        /// <summary>
        /// Build error response.
        /// </summary>
        /// <param name="exception">
        /// The exception.
        /// </param>
        /// <returns>
        /// The <see cref="RegistryInterface"/>.
        /// </returns>
        public RegistryInterface BuildErrorResponse(Exception exception)
        {
            var responseType = new RegistryInterface();
            RegistryInterfaceType regInterface = responseType.Content;
            V2Helper.Header = regInterface;
            var returnType = new SubmitRegistrationResponseType();
            regInterface.SubmitRegistrationResponse = returnType;
            var registrationStatusType = new RegistrationStatusType();
            returnType.RegistrationStatus.Add(registrationStatusType);
            registrationStatusType.StatusMessage = new StatusMessageType();

            this.AddStatus(registrationStatusType.StatusMessage, exception);
            return responseType;
        }
        /// <summary>
        /// The build response.
        /// </summary>
        /// <param name="response">
        /// The response.
        /// </param>
        /// <returns>
        /// The <see cref="RegistryInterface"/>.
        /// </returns>
        public RegistryInterface BuildResponse(IDictionary<IRegistrationObject, Exception> response)
        {
            var responseType = new RegistryInterface();
            RegistryInterfaceType regInterface = responseType.Content;
            var returnType = new SubmitRegistrationResponseType();
            regInterface.SubmitRegistrationResponse = returnType;
            V2Helper.Header = regInterface;

            /* foreach */
            foreach (KeyValuePair<IRegistrationObject, Exception> registration in response)
            {
                this.ProcessResponse(returnType, registration.Key, registration.Value);
            }

            return responseType;
        }