/// <summary>Unconfirmed</summary> public NRA_ABIS_Envelope.Response Delete_Record(NRA_ABIS_Envelope.Request request) { DateTime request_date_time = DateTime.Now; NRA_ABIS_Envelope.EnvelopeType envelope_type = NRA_ABIS_Envelope.EnvelopeType.Delete_Record; 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) }; //} //return new GenericResponse() { ResponseCode = 1001, ResponseMessage = "Deletion Successful", ResponseObject = null }; } catch (Exception ex) { //cslog.Handle_Exception(ex); } return(response); }
/// <summary></summary> private void btn_delete_record_Click(object sender, EventArgs e) { try { txt_response.Clear(); NRA_ABIS_Envelope.Request request = new NRA_ABIS_Envelope.Request(NRA_ABIS_Envelope.EnvelopeType.Delete_Record); NRA_ABIS_Envelope.Response response = _client.Delete_Record(request); Response_To_Text(response); } catch (Exception ex) { MessageBox.Show(ex.Message.ToUpper(), caption_title); } }
/// <summary></summary> private void btn_portrait_verification_Click(object sender, EventArgs e) { try { txt_response.Clear(); NRA_ABIS_Envelope.Request request = new NRA_ABIS_Envelope.Request(NRA_ABIS_Envelope.EnvelopeType.Portrait_Verification); NRA_ABIS_Envelope.Response response = _client.Portrait_Verification(request); Response_To_Text(response); } catch (Exception ex) { MessageBox.Show(ex.Message.ToUpper(), caption_title); } }
/// <summary></summary> private void btn_fingerprint_template_Click(object sender, EventArgs e) { try { txt_response.Clear(); NRA_ABIS_Envelope.Request request = new NRA_ABIS_Envelope.Request(NRA_ABIS_Envelope.EnvelopeType.Fingerprint_Template); NRA_ABIS_Envelope.Response response = _client.Fingerprint_Template(request); Response_To_Text(response); } catch (Exception ex) { MessageBox.Show(ex.Message.ToUpper(), caption_title); } }
/// <summary></summary> private void btn_biometric_identification_result_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_Result); NRA_ABIS_Envelope.Response response = _client.Biometric_Identification_Result(request); Response_To_Text(response); } catch (Exception ex) { MessageBox.Show(ex.Message.ToUpper(), caption_title); } }
/// <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); } }
/// <summary></summary> /// <param name="response"></param> private void Response_To_Text(NRA_ABIS_Envelope.Response response) { string text = string.Empty; string newline_1 = Environment.NewLine + Environment.NewLine; string newline_2 = Environment.NewLine + Environment.NewLine + "\t"; string newline_3 = Environment.NewLine + "\t"; string newline_4 = Environment.NewLine + "\t\t"; string newline_5 = Environment.NewLine + "\t\t\t"; try { if (response == null) { text += "Response is null"; } if (response != null) { //----------------------------------------------------------------------------- //header if (response.Header == null) { text += "HEADER is null"; } if (response.Header != null) { text += "HEADER"; text += newline_3 + "CPRID : " + (response.Header.CPRID == null ? "null" : response.Header.CPRID.ToString()); text += newline_3 + "Guid : " + (response.Header.Guid == null ? "null" : response.Header.Guid.ToString()); text += newline_3 + "ReferenceUID : " + (response.Header.ReferenceUID == null ? "null" : response.Header.ReferenceUID); } //----------------------------------------------------------------------------- //detail if (response.Detail == null) { text += newline_1 + "DETAIL is null"; } if (response.Detail != null) { text += newline_1 + "DETAIL"; //------------------------------------------------------------------------- //fingerprint if (response.Detail.Fingerprint == null) { text += newline_2 + "FINGERPRINT is null"; } if (response.Detail.Fingerprint != null) { if (response.Detail.Fingerprint.Count == 0) { text += newline_2 + "FINGERPRINT has zero data"; } if (response.Detail.Fingerprint.Count > 0) { for (int i = 0; i < response.Detail.Fingerprint.Count; i++) { text += newline_4 + "FINGERPRINT " + (i + 1).ToString("00"); text += newline_5 + "Status : " + (response.Detail.Fingerprint[i].Status == null ? "null" : response.Detail.Fingerprint[i].Status.ToString()); text += newline_5 + "ImageData : " + (response.Detail.Fingerprint[i].ImageData == null ? "null" : response.Detail.Fingerprint[i].ImageData.Length.ToString() + " bytes"); text += newline_5 + "Postion : " + (response.Detail.Fingerprint[i].Postion == null ? "null" : response.Detail.Fingerprint[i].Postion.ToString()); //text += newline_5 + "Template : " + (response.Detail.Fingerprint[i].Template == null ? "null" : response.Detail.Fingerprint[i].Template.Length.ToString() + " bytes"); //text += newline_5 + "TemplateFormat : " + (response.Detail.Fingerprint[i].TemplateFormat == null ? "null" : response.Detail.Fingerprint[i].TemplateFormat.ToString()); text += newline_5 + "Quality : " + (response.Detail.Fingerprint[i].Quality == null ? "null" : response.Detail.Fingerprint[i].Quality.ToString()); } } } //------------------------------------------------------------------------- //portrait if (response.Detail.Portrait == null) { text += newline_2 + "PORTRAIT is null"; } if (response.Detail.Portrait != null) { if (response.Detail.Portrait.Count == 0) { text += newline_2 + "PORTRAIT has zero data"; } if (response.Detail.Portrait.Count > 0) { for (int i = 0; i < response.Detail.Portrait.Count; i++) { text += newline_4 + "PORTRAIT " + (i + 1).ToString("00"); text += newline_5 + "CropLeft : " + (response.Detail.Portrait[i].CropLeft == null ? "null" : response.Detail.Portrait[i].CropLeft.ToString()); text += newline_5 + "CropTop : " + (response.Detail.Portrait[i].CropTop == null ? "null" : response.Detail.Portrait[i].CropTop.ToString()); text += newline_5 + "CropWidth : " + (response.Detail.Portrait[i].CropWidth == null ? "null" : response.Detail.Portrait[i].CropWidth.ToString()); text += newline_5 + "CropHeight : " + (response.Detail.Portrait[i].CropHeight == null ? "null" : response.Detail.Portrait[i].CropHeight.ToString()); text += newline_5 + "ImageDataICAO : " + (response.Detail.Portrait[i].ImageDataICAO == null ? "null" : response.Detail.Portrait[i].ImageDataICAO.Length.ToString() + " bytes"); text += newline_5 + "ImageDataOriginal : " + (response.Detail.Portrait[i].ImageDataOriginal == null ? "null" : response.Detail.Portrait[i].ImageDataOriginal.Length.ToString() + " bytes"); } } } //------------------------------------------------------------------------- //signature if (response.Detail.Signature == null) { text += newline_2 + "SIGNATURE is null"; } if (response.Detail.Signature == null) { if (response.Detail.Signature != null) { if (response.Detail.Signature.Count == 0) { text += newline_2 + "SIGNATURE has zero data"; } if (response.Detail.Signature.Count > 0) { for (int i = 0; i < response.Detail.Signature.Count; i++) { text += newline_4 + "SIGNATURE " + (i + 1).ToString("00"); text += newline_5 + "ImageData : " + (response.Detail.Signature[i].ImageData == null ? "null" : response.Detail.Signature[i].ImageData.Length.ToString() + " bytes"); } } } } //------------------------------------------------------------------------- //template if (response.Detail.Template == null) { text += newline_2 + "TEMPLATE is null"; } if (response.Detail.Template == null) { if (response.Detail.Template != null) { if (response.Detail.Template.Count == 0) { text += newline_2 + "TEMPLATE has zero data"; } if (response.Detail.Template.Count > 0) { for (int i = 0; i < response.Detail.Template.Count; i++) { text += newline_4 + "TEMPLATE " + (i + 1).ToString("00"); text += newline_5 + "TemplateFormat : " + (response.Detail.Template[i].TemplateFormat == null ? "null" : response.Detail.Template[i].TemplateFormat.ToString()); text += newline_5 + "Template : " + (response.Detail.Template[i].Template == null ? "null" : response.Detail.Template[i].Template.Length.ToString() + " bytes"); } } } } //------------------------------------------------------------------------- } //----------------------------------------------------------------------------- //footer if (response.Footer == null) { text += newline_4 + "Footer is null"; } if (response.Footer != null) { text += newline_1 + "FOOTER"; text += newline_3 + "ResponseCode : " + (response.Footer.ResponseCode == null ? "null" : response.Footer.ResponseCode.ToString()); text += newline_3 + "ResponseMessage : " + (response.Footer.ResponseMessage == null ? "null" : response.Footer.ResponseMessage); text += newline_3 + "ResponseStatus : " + (response.Footer.ResponseStatus == null ? "null" : response.Footer.ResponseStatus.ToString()); text += newline_3 + "ResponseType : " + (response.Footer.ResponseType == null ? "null" : response.Footer.ResponseType.ToString()); } //----------------------------------------------------------------------------- } } catch (Exception ex) { text = "Exception" + Environment.NewLine + ex.Message; } txt_response.Text = text; }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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; } }
/// <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); }
/// <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); }
/// <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); }
/// <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); }