Migrating an SKI Connector C++ Client

You can migrate an ActivID SKI Connector C++ web service client from AAA Server 6.7.2 to 6.8.

The examples illustrate the procedures with different web services technologies – ATL Server for AAA Server 6.7.2 and WWSAPI for AAA Server 6.8.

For further information about these technologies, see the corresponding sections in this documentation.

Migration Overview

The migration process focuses on the following differences:

  • As the SOAP communication no longer uses Remote Procedure Call (RPC) encoding, the data is transmitted in literal. This might require using a different web service technology.

  • The endpoint address of the web service has been modified:

    • For AAA Server 6.7.2, it was http://<hostname>:<port>/Invoke?Handler=ActivCardSKIConnectorV2
    • For AAA Server 6.8, it is http://<hostname>:<port>/ws/ActivCardSKIConnectorV2
  • In AAA Server 6.8, most of the ActivID SKI Connector Service API functions now use a structure parameter as single input. Therefore, you need to instantiate and fill this structure before calling the associated function. The name of this structure varies depending on the tool used to generate the client files.

Modify the Web Service Client Configuration

Replace the endpoint address in the AAA Server 6.7.2 implementation

Copy
CString sHostname = "<hostname>";
CString sPortNumber = "<port>";
char pszUrl[512] = "";
sprintf_s(    pszUrl, 
        sizeof(pszUrl), 
        "http://%s:%s/Invoke?Handler=ActivCardSKIConnectorV2", 
        sHostname.GetString(), 
        sPortNumber.GetString());

With the new endpoint address in the AAA Server 6.8 implementation:

Copy
CString sHostname = "<hostname>";
CString sPortNumber = "<port>";
char pszUrl[512] = "";
sprintf_s(    pszUrl, 
        sizeof(pszUrl), 
        "http://%s:%s/ws/ActivCardSKIConnectorV2", 
        sHostname.GetString(), 
        sPortNumber.GetString());

Modify the ActivID SKI Connector Function Calls

This section explains how to modify the structure for the input parameters before you can call the functions.

The following steps are illustrated with both the AAA Server 6.7.2 and 6.8 implementations to highlight the differences.

Input the Parameters

  • AAA Server 6.7.2 Implementation
  • Allocate the input parameters:

Copy
BSTR sTMPUserID = SysAllocString(L"<user_ID>");
BSTR sTMPDeviceType = SysAllocString(L"<device_type>");
BSTR sTMPDeviceSN = SysAllocString(L"<device_SN>");
BSTR sTMPChallenge = SysAllocString(L"<challenge>");
  • AAA Server 6.8 Implementation
  • Initialize a structure for the input parameters and fill it:

Copy
_getUnlockPinCodeIn inParameters = {};
inParameters.getUnlockPinCodeInHLogin = hLogin;
inParameters.getUnlockPinCodeInUserID = SysAllocString(L"<user_ID>");
inParameters.getUnlockPinCodeInDeviceType = SysAllocString(L"<device_type>");
inParameters.getUnlockPinCodeInDeviceSn = SysAllocString(L"<device_SN>");
inParameters.getUnlockPinCodeInChallenge = SysAllocString(L"<challenge>");

Call the Functions

  • AAA Server 6.7.2 Implementation
  • Call the function with all the parameters one by one:

Copy
BSTR sRetString = SysAllocString(L"");
hRes = pService->getUnlockPinCode(    hLogin,                                            
                                                          sTMPUserID,                                            
                                                      sTMPDeviceType,
                                            sTMPDeviceSN,
                                            sTMPChallenge,
                                            &sRetString);
  • AAA Server 6.8 Implementation
  • Use the structure as the single input parameter and call the function:

Copy
BSTR sRetString = NULL;
hRes = ActivCardSKIConnectorV2Soap_getUnlockPinCode(    proxy,
                                                                                          &inParameters,
                                                                       &sRetString,
                                                                    heap,
                                                                    NULL,
                                                                    0,
                                                                    NULL,
                                                                    error);

Free the Allocated Variables

  • AAA Server 6.7.2 Implementation
  • Free the allocated variables:

Copy
SysFreeString(sTMPUserID);
SysFreeString(sTMPDeviceType);
SysFreeString(sTMPDeviceSN); 
SysFreeString(sTMPChallenge);
  • AAA Server 6.8 Implementation
  • Free the allocated variables:

Copy
SysFreeString(inParameters.getUnlockPinCodeInUserID);
SysFreeString(inParameters.getUnlockPinCodeInDeviceType);
SysFreeString(inParameters.getUnlockPinCodeInDeviceSn);
SysFreeString(inParameters.getUnlockPinCodeInChallenge);