RD Service Integration Doc With Sample Code
RD Service Integration Doc With Sample Code
Manish Pandey
25th Jan 2018
Approved By Date Approved
Udita Singh
25th Jan 2018
Comments
References
Table of Contents
1. Introduction ........................................................................................................................5
2. Scope ..................................................................................................................................5
3. Installation Steps of RD service ............................................................................................5
4. Un-Installation Steps ...........................................................................................................5
5. Registration steps of Biometric Device ................................................................................5
6. Pre-Requisites for Https Communication from Web Browser after Installation .................6
7. Configuration settings according to environment ................................................................6
7.1 Staging : .........................................................................................................................6
7.2 Preproduction : ..............................................................................................................7
7.3 Production : ...................................................................................................................7
8. RD Services API Calling ........................................................................................................8
8.1 RDSERVICE .....................................................................................................................8
8.2 DEVICEINFO ...................................................................................................................9
8.3 CAPTURE .....................................................................................................................10
9. Error Codes from RD service ..............................................................................................13
10. Troubleshooting .............................................................................................................14
11. S/W and H/W Requirements for new release .................................................................17
1. Introduction
Purpose of this document is to help the developers to integrate the Windows RD service in their
application.
2. Scope
Scope of this document is limited to the Windows RD, its installation, integration with the Client
application.
4. Un-Installation Steps
Please note:
The server.crt is a CA signed certificate, in case of integration it can be a self signed
certificate. But to avoid any browser issue please use signed certificate.
To generate a self signed certificate please follow the below link:
https://www.ibm.com/support/knowledgecenter/en/SSWHYP_4.0.0/com.ibm.apimgmt.
cmc.doc/task_apionprem_gernerate_self_signed_openSSL.html
or
https://jamielinux.com/docs/openssl-certificate-authority/
7.1 Staging :
---------------------------------------------------------------------
7.2 Preproduction :
7.3 Production :
Keyrotation : https://rdm.smartbioplus.com/rdm-key-management-
app/keyRotation
Telemetry : https://rdm.smartbioplus.com/rdm-telemetry-app/telemetry
8.1 RDSERVICE
Function
RDService()
{
var url = "http://127.0.0.1:11100";
var xhr;
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet
Explorer, return version number
{
//IE browser
xhr = new ActiveXObject("Microsoft.XMLHTTP");
} else {
//other browser
xhr = new XMLHttpRequest();
}
xhr.open('RDSERVICE', url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4){
var status = xhr.status;
if (status == 200) {
alert(xhr.responseText);
console.log(xhr.response);
} else {
console.log(xhr.response);
}
}
};
/*setTimeout(function(){
xhr.send();},1000);*/
xhr.send();
}
8.2 DEVICEINFO
To get device info, please use the below Javascript code snippet:
function
DeviceInfo()
{
var url = "http://127.0.0.1:11100/getDeviceInfo";
var xhr;
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet
Explorer, return version number
{
//IE browser
Classification: Restricted Page 9 of 17
RD Client Integration Document
if (xhr.readyState == 4){
var status = xhr.status;
if (status == 200) {
alert(xhr.responseText);
console.log(xhr.response);
} else {
console.log(xhr.response);
}
}
};
xhr.send();
}
Response data:
<DeviceInfo dpId="" rdsId="" rdsVer="" dc="" mi="" mc="" >
<additional_info><Param name=”serial_number” value=”"/></additional_info></DeviceInfo>
8.3 CAPTURE
To use CAPTURE command, please use the below Javascript code snippet:
function
{
Capture()
var url = "http://127.0.0.1:11100/capture";
var PIDOPTS='<PidOptions ver=\"1.0\">'+'<Opts fCount=\"1\" fType=\"0\"
iCount=\"\" iType=\"\" pCount=\"\" pType=\"\" format=\"0\" pidVer=\"2.0\"
timeout=\"10000\" otp=\"\" wadh=\"\" posh=\"\"/>'+'</PidOptions>';
/*
format=\"0\" --> XML
format=\"1\" --> Protobuf
*/
var xhr;
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) // If Internet
Explorer, return version number
{
//IE browser
xhr = new ActiveXObject("Microsoft.XMLHTTP");
} else {
//other browser
xhr = new XMLHttpRequest();
}
xhr.open('CAPTURE', url, true);
xhr.setRequestHeader("Content-Type","text/xml");
xhr.setRequestHeader("Accept","text/xml");
xhr.onreadystatechange = function () {
if (xhr.readyState == 4){
var status = xhr.status;
if (status == 200) {
alert(xhr.responseText);
} else {
console.log(xhr.response);
}
}
};
xhr.send(PIDOPTS);
}
10. Troubleshooting
10. 190 Invalid value for format When RD Service calling Before calling capture
application sends wrong function check format
value for format according attribute value properly. It
to UIDAI registered device should be according to UIDAI
document. registered device document.
11. 200 Invalid Demo structure When RD Service calling Before calling capture
application sends wrong function check Demo xml
Demo xml format according format attribute value
to UIDAI Aadhaar properly. It should be
authentication document. according to UIDAI Aadhaar
authentication document.
11. 700 Capture timed out. If Customer not putting Make sure customer put their
finger on sensor within finger on sensor within giving
giving timeout. timeout.
12. 710 Being used by another If Fingerprint sensor busy Make sure fingerprint sensor
application. by another application should be in ready state. So
call device info and check rd
service status before calling
13. 710 Being used by another If Fingerprint sensor busy Make sure fingerprint sensor
application. by another application should be in ready state. So
call device info and check rd
service status before calling
capture. If RD Service status is
ready than capture should be
perform.
14. 720 Device not ready. If Fingerprint device haven’t Make sure fingerprint sensor
permission. has permission and USB cable
connection should be perfect.
During capture usb
connection loose.
correct(according to RD
Service environment).