/// <summary></summary>
        private void btn_biometric_identification_Click(object sender, EventArgs e)
        {
            try
            {
                txt_response.Clear();

                NRA_ABIS_Envelope.Request request = new NRA_ABIS_Envelope.Request(NRA_ABIS_Envelope.EnvelopeType.Biometric_Identification);

                NRA_ABIS_Envelope.Response response = _client.Biometric_Identification(request);

                Response_To_Text(response);

                web_browser.Url = new System.Uri(@"C:\Temp\DHA Test\10 Only\020506162777400420302_00001.xml");
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToUpper(), caption_title);
            }
        }
Ejemplo n.º 2
0
 public NRA_ABIS_Envelope.Response Fingerprint_Insert(NRA_ABIS_Envelope.Request request)
 {
     return(base.Channel.Fingerprint_Insert(request));
 }
Ejemplo n.º 3
0
 public System.Threading.Tasks.Task <NRA_ABIS_Envelope.Response> Fingerprint_Identification_ResultAsync(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Fingerprint_Identification_ResultAsync(Request));
 }
Ejemplo n.º 4
0
        /// <summary>Asyncronous : </summary>
        public NRA_ABIS_Envelope.Response Biometric_Identification_Result(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Biometric_Identification_Result;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                //if (string.IsNullOrEmpty(request.Header.ReferenceUID))
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_reference_uid) };
                //}

                ////validate detail

                //if (request.Detail == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_detail_object) };
                //}

                ////validate fingerprint data

                //if (request.Detail.Fingerprint == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_object) };
                //}

                //if (request.Detail.Fingerprint.Count == 0)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_data) };
                //}

                //for (int i = 0; i < request.Detail.Fingerprint.Count; i++)
                //{
                //    if (request.Detail.Fingerprint[i].ImageData.Length < min_fingerprint_image_data_length)
                //    {
                //        return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_image_data, i) };
                //    }
                //}

                ////validate portrait data

                //if (request.Detail.Portrait == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_object) };
                //}

                //if (request.Detail.Portrait.Count == 0)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_data) };
                //}

                //for (int i = 0; i < request.Detail.Portrait.Count; i++)
                //{
                //    if (request.Detail.Portrait[i].ImageDataICAO.Length < min_portrait_image_data_icao_length)
                //    {
                //        return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_image_data_icao, i) };
                //    }

                //    if (request.Detail.Portrait[i].ImageDataOriginal.Length < min_portrait_image_data_original_length)
                //    {
                //        return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_image_data_original, i) };
                //    }
                //}

                //validate signature data


                //validate template data

                //if (request.Detail.Fingerprint[i].Template.Length < min_fingerprint_template_length)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_template_data, i) };
                //}



                ////face identification reuslt

                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "BiometricIdentificationResult", Environment.NewLine, "Sending transaction with reference id " + identificationResultRequest.ReferenceUniqID + " for Biometric identification"));



                //populate identification response

                //response = new IdentificationResponse()
                //{
                //    CPR_ID = long.Parse(DateTime.Now.ToString("yyMMddHHmmssfff")),
                //    ReferenceUniqID = identificationResultRequest.ReferenceUniqID
                //};

                //genericResponse = new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Reference unique id not supplied", ResponseObject = response };

                //return genericResponse;
            }

            catch (Exception ex)
            {
                //response = new IdentificationResponse();
                //cslog.Handle_Exception(ex);
                //genericResponse = new GenericResponse() { ResponseCode = 1006, ResponseMessage = ex.Message.ToUpperInvariant(), ResponseObject = response };
                //return genericResponse;
            }

            return(response);
        }
Ejemplo n.º 5
0
        /// <summary>Validate a requets envelope</summary>
        internal static NRA_ABIS_Envelope.Response Request(NRA_ABIS_Envelope.Request request, NRA_ABIS_Envelope.EnvelopeType envelope_type, DateTime request_date_time
                                                           , bool header_cprid, bool header_guid, bool header_reference_uid
                                                           , bool detail_fingerprint, bool detail_portrait, bool detail_signature, bool detail_template)
        {
            try
            {
                //---------------------------------------------------------------------------------

                //validate the request object

                if (request == null)
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_request_object)
                    });
                }

                //---------------------------------------------------------------------------------

                //validate the request header

                if (request.Header == null)
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_header_object)
                    });
                }

                if (header_cprid
                    &&
                    request.Header.CPRID == null)
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_cpr_id)
                    });
                }

                if (header_guid
                    &&
                    request.Header.Guid == null)
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_guid)
                    });
                }

                if (header_reference_uid
                    &&
                    string.IsNullOrEmpty(request.Header.ReferenceUID))
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_reference_uid)
                    });
                }

                if (request.Header.RequestType == null)
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_request_type)
                    });
                }

                if (request.Header.RequestType != envelope_type)
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.invalid_request_type)
                    });
                }

                //---------------------------------------------------------------------------------

                //validate request detail

                if (request.Detail == null)
                {
                    return(new NRA_ABIS_Envelope.Response()
                    {
                        Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_detail_object)
                    });
                }

                //---------------------------------------------------------------------------------

                //validate request detail fingerprint

                if (detail_fingerprint)
                {
                    if (request.Detail.Fingerprint == null)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_fingerprint_object)
                        });
                    }

                    if (request.Detail.Fingerprint.Count < 1)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_fingerprint_data)
                        });
                    }

                    for (int i = 0; i < request.Detail.Fingerprint.Count; i++)
                    {
                        if (request.Detail.Fingerprint[i].Status == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_fingerprint_status, i)
                            });
                        }

                        if (request.Detail.Fingerprint[i].ImageData == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_fingerprint_image_data, i)
                            });
                        }

                        if (request.Detail.Fingerprint[i].ImageData.Length < min_fingerprint_image_data_length)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.invalid_fingerprint_image_data_length, i)
                            });
                        }

                        if (request.Detail.Fingerprint[i].ImageFormat == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_fingerprint_image_format, i)
                            });
                        }

                        if (request.Detail.Fingerprint[i].Postion == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_fingerprint_position, i)
                            });
                        }

                        if (request.Detail.Fingerprint[i].Quality == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_fingerprint_quality, i)
                            });
                        }
                    }
                }

                //---------------------------------------------------------------------------------

                //validate request detail portrait

                if (detail_portrait)
                {
                    if (request.Detail.Portrait == null)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_object)
                        });
                    }

                    if (request.Detail.Portrait.Count < 1)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_data)
                        });
                    }

                    for (int i = 0; i < request.Detail.Portrait.Count; i++)
                    {
                        if (request.Detail.Portrait[i].ImageDataICAO == null
                            &&
                            request.Detail.Portrait[i].ImageDataOriginal == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_image_data, i)
                            });
                        }

                        if (request.Detail.Portrait[i].ImageDataICAO != null
                            &&
                            request.Detail.Portrait[i].ImageDataOriginal != null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.double_portrait_image_data, i)
                            });
                        }

                        if (request.Detail.Portrait[i].ImageDataICAO == null)
                        {
                            if (request.Detail.Portrait[i].CropHeight == null)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_crop_height, i)
                                });
                            }

                            if (request.Detail.Portrait[i].CropLeft == null)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_crop_left, i)
                                });
                            }

                            if (request.Detail.Portrait[i].CropTop == null)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_crop_top, i)
                                });
                            }

                            if (request.Detail.Portrait[i].CropWidth == null)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_crop_width, i)
                                });
                            }

                            if (request.Detail.Portrait[i].ImageDataOriginal == null)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_image_data_original, i)
                                });
                            }

                            if (request.Detail.Portrait[i].ImageDataOriginal.Length < min_portrait_image_data_original_length)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.invalid_portrait_image_data_original_length, i)
                                });
                            }

                            if (request.Detail.Portrait[i].ImageFormat == null)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_image_format, i)
                                });
                            }
                        }

                        if (request.Detail.Portrait[i].ImageDataOriginal == null)
                        {
                            if (request.Detail.Portrait[i].ImageDataICAO == null)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_portrait_image_data_icao, i)
                                });
                            }

                            if (request.Detail.Portrait[i].ImageDataICAO.Length < min_portrait_image_data_icao_length)
                            {
                                return(new NRA_ABIS_Envelope.Response()
                                {
                                    Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.invalid_portrait_image_data_icao_length, i)
                                });
                            }
                        }
                    }
                }

                //---------------------------------------------------------------------------------

                //validate request detail signature

                if (detail_signature)
                {
                    if (request.Detail.Signature == null)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_signature_object)
                        });
                    }

                    if (request.Detail.Signature.Count < 1)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_signature_data)
                        });
                    }

                    for (int i = 0; i < request.Detail.Signature.Count; i++)
                    {
                        if (request.Detail.Signature[i].ImageData == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_signature_image_data, i)
                            });
                        }

                        if (request.Detail.Signature[i].ImageData.Length < min_signature_image_data_length)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.invalid_signature_image_data_length, i)
                            });
                        }

                        if (request.Detail.Signature[i].ImageFormat == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_signature_image_format, i)
                            });
                        }
                    }
                }

                //---------------------------------------------------------------------------------

                //validate request detail template

                if (detail_template)
                {
                    if (request.Detail.Template == null)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_template_object)
                        });
                    }

                    if (request.Detail.Template.Count < 1)
                    {
                        return(new NRA_ABIS_Envelope.Response()
                        {
                            Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_template_data)
                        });
                    }

                    for (int i = 0; i < request.Detail.Template.Count; i++)
                    {
                        if (request.Detail.Template[i].Template == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_template_image_data, i)
                            });
                        }

                        if (request.Detail.Template[i].Template.Length < min_template_data_length)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.invalid_template_data_length, i)
                            });
                        }

                        if (request.Detail.Template[i].TemplateFormat == null)
                        {
                            return(new NRA_ABIS_Envelope.Response()
                            {
                                Footer = Request_Exceptions.Set_Exception(envelope_type, request_date_time, Exception_Type.no_template_format, i)
                            });
                        }
                    }
                }

                //---------------------------------------------------------------------------------
            }

            catch (Exception ex)
            {
            }

            return(null);
        }
Ejemplo n.º 6
0
 public NRA_ABIS_Envelope.Response Delete_Record(NRA_ABIS_Envelope.Request request)
 {
     return(base.Channel.Delete_Record(request));
 }
Ejemplo n.º 7
0
 public NRA_ABIS_Envelope.Response Portrait_Verification(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Portrait_Verification(Request));
 }
Ejemplo n.º 8
0
 public NRA_ABIS_Envelope.Response Fingerprint_Verification(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Fingerprint_Verification(Request));
 }
Ejemplo n.º 9
0
        /// <summary>Synchronous : Fingerprint verification service operation</summary>
        public NRA_ABIS_Envelope.Response Fingerprint_Verification(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Fingerprint_Verification;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                //if (request.Header.CPRID == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_cpr_id) };
                //}

                ////validate detail

                //if (request.Detail == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_detail_object) };
                //}

                ////validate fingerprint data

                //if (request.Detail.Fingerprint == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_object) };
                //}

                //if (request.Detail.Fingerprint.Count == 0)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_data) };
                //}



                //List<Fingerprint> FingerList = new List<Fingerprint>();
                //List<Fingerprint> TempFingerList = verificationRequest.biometricInfo.fingerprints.OfType<Fingerprint>().ToList();

                //if (TempFingerList.Count < 1)
                //{
                //    //response = new VerificationResponse();
                //    //genericResponse = new GenericResponse() { ResponseCode = 1007, ResponseMessage = "No fingerprints available for Verification", ResponseObject = (VerificationResponse)response };
                //    cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Message: {2}", Environment.MachineName, Environment.NewLine, "No fingerprints available for Verification"));
                //    //return genericResponse;
                //}


                //foreach (Fingerprint fin in TempFingerList)
                //{
                //    if (fin != null)
                //    {
                //        if (fin.status != 0 && fin.wsqImage != null)
                //        {
                //            FingerList.Add(fin);
                //        }
                //    }
                //}

                //int FingerCounts = FingerList.Count;
                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Message: {2}", Environment.MachineName, Environment.NewLine, FingerCounts + " detected available for verification"));

                //Call Matcher to match fingers



                //Populate VerificationResponse with match results

                //response = new VerificationResponse()
                //{
                //    ReferenceUniqID = Guid.NewGuid().ToString().ToUpper(),
                //    result = true
                //};
                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "FingerprintIdentification", Environment.NewLine, "Sending Transaction with Reference ID: " + response.ReferenceUniqID + " For Fingerprint Identification"));


                //genericResponse = new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Successful fingerprint identification", ResponseObject = (VerificationResponse)response };

                //return genericResponse;
            }
            catch (Exception ex)
            {
                //response = new VerificationResponse();
                //cslog.Handle_Exception(ex);
                //genericResponse = new GenericResponse() { ResponseCode = 1008, ResponseMessage = ex.Message.ToUpperInvariant(), ResponseObject = response };
                //return genericResponse;
            }

            return(response);
        }
Ejemplo n.º 10
0
        /// <summary>Synchronous : Generate template request for DCS server</summary>
        public NRA_ABIS_Envelope.Response Fingerprint_Template(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Fingerprint_Template;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                ////validate detail

                //if (request.Detail == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_detail_object) };
                //}

                ////validate fingerprint data

                //if (request.Detail.Fingerprint == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_object) };
                //}

                //if (request.Detail.Fingerprint.Count == 0)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_data) };
                //}



                //List<Fingerprint> FingerList = new List<Fingerprint>();
                //List<Fingerprint> TempFingerList = fingerprint.OfType<Fingerprint>().ToList();

                //if (TempFingerList.Count < 1)
                //{
                //    //response = new ISOFingerprintTemplates();
                //    genericResponse = new GenericResponse() { ResponseCode = 1004, ResponseMessage = "No Fingerprint Images Available", ResponseObject = response };
                //    cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "GenerateFingerprintTemplates", Environment.NewLine, "No Fingerprints Images Available"));
                //    //return genericResponse;
                //}


                //foreach (Fingerprint fin in TempFingerList)
                //{
                //    if (fin != null)
                //    {
                //        if (fin.status != 0 && fin.wsqImage != null)
                //        {
                //            FingerList.Add(fin);
                //        }
                //    }
                //}


                // Determine which fingers are available and send them for matching



                //Prepare response structure

                //response = new ISOFingerprintTemplates()
                //{
                //    ReferenceUniqID = Guid.NewGuid().ToString().ToUpper()
                //    ,
                //    fingerprintTemplates = new FingerprintTemplate[10]
                //};
                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "FingerprintIdentification", Environment.NewLine, "Total of: " + FingerList.Count.ToString() + " Recieved For a Template Generation"));
                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "FingerprintIdentification", Environment.NewLine, "Successfully Generated Templates For Reference ID: " + response.ReferenceUniqID));


                //genericResponse = new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Successful fingerprint identification", ResponseObject = response };

                //return genericResponse;
            }
            catch (Exception ex)
            {
                //response = new ISOFingerprintTemplates();
                //cslog.Handle_Exception(ex);
                //genericResponse = new GenericResponse() { ResponseCode = 1006, ResponseMessage = ex.Message.ToUpperInvariant(), ResponseObject = response };
                //return genericResponse;
            }

            return(response);
        }
Ejemplo n.º 11
0
        /// <summary>Unconfirmed service call</summary>
        public NRA_ABIS_Envelope.Response Fingerprint_Insert(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Fingerprint_Insert;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                ////validate detail

                //if (request.Detail == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_detail_object) };
                //}

                ////validate fingerprint data

                //if (request.Detail.Fingerprint == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_object) };
                //}

                //if (request.Detail.Fingerprint.Count == 0)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_fingerprint_data) };
                //}



                //return new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Fingerprint Inserted Successful", ResponseObject = null };
            }

            catch (Exception ex)
            {
                //cslog.Handle_Exception(ex);
            }

            return(response);
        }
Ejemplo n.º 12
0
        /// <summary>Asyncronous : Operation for identifying CPR using biometric information</summary>
        public NRA_ABIS_Envelope.Response Biometric_Identification(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Biometric_Identification;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                //List<Fingerprint> FingerList = new List<Fingerprint>();
                //List<Fingerprint> TempFingerList = biometricInfo.fingerprints.OfType<Fingerprint>().ToList();

                //if (TempFingerList.Count < 1)
                //{
                //    //response = new IdentificationResponse();
                //    genericResponse = new GenericResponse() { ResponseCode = 1005, ResponseMessage = "No Fingerprints Images Available", ResponseObject = response };

                //    cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "BiometricIdentification", Environment.NewLine, "No Fingerprints Images Available"));
                //    //return genericResponse;
                //}



                //foreach (Fingerprint fin in TempFingerList)
                //{
                //    if (fin != null)
                //    {
                //        if (fin.status != 0 && fin.wsqImage != null)
                //        {
                //            FingerList.Add(fin);
                //        }
                //    }
                //}



                // Determine which fingers are available and send them for matching
                //response = new IdentificationResponse()
                //{
                //    CPR_ID = long.Parse(DateTime.Now.ToString("yyMMddHHmmssfff"))
                //    ,
                //    ReferenceUniqID = Guid.NewGuid().ToString().ToUpper()
                //};
                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "FingerprintIdentification", Environment.NewLine, "Total of: " + FingerList.Count.ToString() + " Recieved For a Fingerprint Identification"));
                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "FingerprintIdentification", Environment.NewLine, "Sending Transaction with Reference ID: " + response.ReferenceUniqID + " For Fingerprint Identification"));


                //genericResponse = new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Successful Biometric identification", ResponseObject = response };

                //return genericResponse;



                //return

                return(response);
            }

            catch (Exception ex)
            {
                return(new NRA_ABIS_Envelope.Response()
                {
                    Footer = Request_Exceptions.Set_Exception(envelope_type, ex)
                });
            }

            finally
            {
                //set the response date time

                response.Footer.ResponseDateTime = DateTime.Now;
            }
        }
Ejemplo n.º 13
0
        /// <summary>Asynchronuos</summary>
        public NRA_ABIS_Envelope.Response Fingerprint_Identification_Result(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Fingerprint_Identification_Result;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                //if (string.IsNullOrEmpty(request.Header.ReferenceUID))
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_reference_uid) };
                //}



                ////response = new IdentificationResponse()
                ////{
                ////    CPR_ID = long.Parse(DateTime.Now.ToString("yyMMddHHmmssfff"))
                ////    ,
                ////    ReferenceUniqID = identificationResponse.ReferenceUniqID
                ////};


                ////cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "FingerprintIdentificationResult Operation", Environment.NewLine, "Sending Transaction with Reference ID: " + response.ReferenceUniqID + " For Fingerprint Identification"));

                //// Determine which fingers are available and send them for matching

                //genericResponse = new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Successful fingerprint identification", ResponseObject = response };

                //return genericResponse;
            }
            catch (Exception ex)
            {
                //response = new IdentificationResponse();
                //cslog.Handle_Exception(ex);
                //genericResponse = new GenericResponse() { ResponseCode = 1006, ResponseMessage = ex.Message.ToUpperInvariant(), ResponseObject = response };
                //return genericResponse;
            }

            return(response);
        }
Ejemplo n.º 14
0
        /// <summary>Synchronous : </summary>
        public NRA_ABIS_Envelope.Response Biometric_Information(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Biometric_Information;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                //if (request.Header.CPRID == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_cpr_id) };
                //}



                //Prepare response structure

                //response = new BiometricInfo()
                //{
                //    fingerprints = new Fingerprint[10],
                //    portrait = new FacePortrait(),
                //    guid = Guid.NewGuid().ToString().ToUpper(),
                //    signatureImage = new byte[] { 0 }

                //};

                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "GetBiometricInformation", Environment.NewLine, "Successfully Recieved Biometric Information For Reference ID: " + response.guid));


                //genericResponse = new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Successful Recieved Biometric Information", ResponseObject = response };

                //return genericResponse;
            }
            catch (Exception ex)
            {
                //response = new BiometricInfo();
                //cslog.Handle_Exception(ex);
                //genericResponse = new GenericResponse() { ResponseCode = 1006, ResponseMessage = ex.Message.ToUpperInvariant(), ResponseObject = response };
                //return genericResponse;
            }

            return(response);
        }
Ejemplo n.º 15
0
 public NRA_ABIS_Envelope.Response Fingerprint_Template(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Fingerprint_Template(Request));
 }
Ejemplo n.º 16
0
 public System.Threading.Tasks.Task <NRA_ABIS_Envelope.Response> Fingerprint_TemplateAsync(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Fingerprint_TemplateAsync(Request));
 }
Ejemplo n.º 17
0
        /// <summary>Asynchronuos</summary>
        public NRA_ABIS_Envelope.Response Portrait_Identification_Result(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Portrait_Identification_Result;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                //if (string.IsNullOrEmpty(request.Header.ReferenceUID))
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_reference_uid) };
                //}

                ////validate detail

                //if (request.Detail == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_detail_object) };
                //}

                ////validate portrait data

                //if (request.Detail.Portrait == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_object) };
                //}

                //if (request.Detail.Portrait.Count == 0)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_data) };
                //}



                ////face identification reuslt

                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Source: {2}, {3}, Log Message: {4}", Environment.MachineName, Environment.NewLine, "FaceIdentificationResult", Environment.NewLine, "Sending transaction with reference id " + faceIdentificationResultRequest.ReferenceUniqID + " for face identification"));



                //populate identification response

                //response = new IdentificationResponse()
                //{
                //    CPR_ID = long.Parse(DateTime.Now.ToString("yyMMddHHmmssfff"))
                //    ,
                //    ReferenceUniqID = faceIdentificationResultRequest.ReferenceUniqID
                //};
            }

            catch (Exception ex)
            {
                //response = new IdentificationResponse();

                //cslog.Handle_Exception(ex);
            }

            return(response);
        }
Ejemplo n.º 18
0
 public NRA_ABIS_Envelope.Response Portrait_Identification_Result(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Portrait_Identification_Result(Request));
 }
Ejemplo n.º 19
0
 public NRA_ABIS_Envelope.Response Biometric_Identification_Result(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Biometric_Identification_Result(Request));
 }
Ejemplo n.º 20
0
 public System.Threading.Tasks.Task <NRA_ABIS_Envelope.Response> Portrait_VerificationAsync(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Portrait_VerificationAsync(Request));
 }
Ejemplo n.º 21
0
 public NRA_ABIS_Envelope.Response Biometric_Information(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Biometric_Information(Request));
 }
Ejemplo n.º 22
0
 public System.Threading.Tasks.Task <NRA_ABIS_Envelope.Response> Delete_RecordAsync(NRA_ABIS_Envelope.Request request)
 {
     return(base.Channel.Delete_RecordAsync(request));
 }
Ejemplo n.º 23
0
 public System.Threading.Tasks.Task <NRA_ABIS_Envelope.Response> Biometric_InformationAsync(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Biometric_InformationAsync(Request));
 }
Ejemplo n.º 24
0
 public NRA_ABIS_Envelope.Response Fingerprint_Identification_Result(NRA_ABIS_Envelope.Request Request)
 {
     return(base.Channel.Fingerprint_Identification_Result(Request));
 }
Ejemplo n.º 25
0
        /// <summary>Synchronous</summary>
        public NRA_ABIS_Envelope.Response Portrait_Verification(NRA_ABIS_Envelope.Request request)
        {
            DateTime request_date_time = DateTime.Now;

            NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Portrait_Verification;

            NRA_ABIS_Envelope.Response response = null;

            try
            {
                //validate request

                response = Validate.Request(request, envelope_type, request_date_time, true, false, false, true, true, false, false);

                if (response != null)
                {
                    return(response);
                }



                ////validate request

                //if (request == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_object) };
                //}

                ////validate header

                //if (request.Header == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_header_object) };
                //}

                //if (request.Header.RequestType == null
                //    ||
                //    request.Header.RequestType != envelope_type)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_request_type) };
                //}

                //if (request.Header.CPRID == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_cpr_id) };
                //}

                ////validate detail

                //if (request.Detail == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_detail_object) };
                //}

                ////validate portrait data

                //if (request.Detail.Portrait == null)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_object) };
                //}

                //if (request.Detail.Portrait.Count == 0)
                //{
                //    return new NRA_ABIS_Envelope.Response() { Footer = Request_Exceptions.Set_Exception(envelope_type, Exception_Type.no_portrait_data) };
                //}



                ////call matcher to match portrait

                //cslog.WriteToTransactionLog(string.Format("Log Source Server: {0}, {1}, Log Message: {2}", Environment.MachineName, Environment.NewLine, "FacialPortraitVerification", Environment.NewLine, "Portrait available"));



                //populate verification response with match results

                //response = new VerificationResponse()
                //{
                //    ReferenceUniqID = Guid.NewGuid().ToString().ToUpper()
                //    ,
                //    result = true
                //};
            }
            catch (Exception ex)
            {
                //response = new VerificationResponse() { result = false };

                //cs/*l*/og.Handle_Exception(ex);
            }

            return(response);
        }