Within this documentation, you may find helpful information and steps that are necessary in order to connect your own storage with the help of KGS SAPALink SDKs.
General Description
The KGS SAPALink SDK was developed for customers and partners who already own DMS archive/storage and wish to extend it with SAP connection abilities.
In order to realize SAPALink-conform capabilities, the provided method bodies have to be implemented.
This includes methods like LinkOpen to open a connection to your own archive or all required functions for CREATE.
KGS ContentServer4Storages plays a central role within this process.
SAP System ↔ KGS ContentServer4Storage ↔ (Generic Storage Provider) ↔ SAPALINK-Implementation ↔ Store/DMS of the customer
Downloading SAPALink SDK
You may download the KGS SAPALink SDK from our download area at https://download.kgs-software.com/ → KGS SAPALink Framework API
Description of the ZIP-container
The downloaded ZIP container follows a certain structure:
Docu
Within this folder, you may find the manual for the SAPALink SDK as well as two KGS specific manuals.SAPALINK Add-On 2_10A.pdf
Refers to extended functionalities like componentCreateCOLD as well as DocumentKeysSet
Please note: componentCreateCOLD is deprecated and will not be supported by the OSGi-ContentServer4Storage-Version!SAPALINK Query.pdf
SAPALINK SDK ImpRevGuide
Runtime
The runtime directory contains the compiled SAPALINKTEST.exe, which you may use in order to test your implementations. It’s still recommended to use the KGS API Tester application in order to test your implementations.SAPALINKTEST.DAT
The SAPALINKTEST.DAT-file is being used as a Settings-file by the SAPALINKTEST.exeSAPALINKTEST.EXE
Storage-profile.txt
The storage-profile.txt-file has to point to a valid KGS Storage-configuration
CPlusPlus
JavaDMSlink.dll
Within this directory you may find libraries and precompiled Java-classes necessary in order to load your C++ SAPALink-implementation into the KGS ContentServer4Storage.DMSException.class
SAPALinkDLL.class
32 Bit
JavaDMSlink.dll
x64
JavaDMSlink.dll
SAPALINK
Visual C++ Project for creating a C++-based implementation of SAPALink SDK
Test-Store-Implementations
x64
SAPALINK.dll
Test implementation library compiled against 64-bit
x86
SAPALINK.dll
Test implementation library compiled against 32-bit
Test-Store-Prerequisites.txt
This file contains a hint of where to get the “VC Redistributable”-package for the corresponding test implementation.
Java
SAPALINK.JAVA
DMSException.java
SAPALink.java
If you’re implementing your classes in Java you’ll have to implement the DMSException.java (for error handling) as well as the SAPALink.java for each required method and compile it.
SAPALINKTEST
Sources (C++) for SAPALINKTEST.exe
In order to understand how the SAPALINKTEST.exe-application works and which methods are being provided by KGS we decided to provide you with our source-code for this testing application.
TestDocuments
Some test documents (tif,pdf)
Basic implementation of SAPALink SDK in C++
In order to implement SAPALink in C++ you may use the Visual C++-project which is included within the ZIP-container you downloaded from KGS website. Please note: Depending on the version of Visual Studio you’re using, Visual Studio might upgrade the project to a newer version. The project is located here <Unpacked directory path>\SAPALink_SDK_v210H-2\CPlusPlus\SAPALINK\SAPALINK.dsw . When opened (and if necessary updated to a newer project version) you’ll find within the project in Visual Studio the DMS.cpp-file. Within this class file you may find the method bodies as well as some comments regarding the functions, results and parameters. LinkOpen - as provided Within this method you may define the vendor name, product name, the version of your DMS system as well as the DLL version. A sample implementation is provided below. Please note: All four parameters need to be provided in order to get a properly initialized SAPALink implementation. Please note also: It’s strongly recommended, that you refrain from using special characters (including UTF-8). In order to test your implementation, you may compile your implementation (either against x86 resulting in 32-bit-library or against x64 which will result in a 64-bit-library depending on your OS, Java, and webserver), copy the resulting SAPALINK.dll-file to your web server as well as the files and libraries described within the next section and configure it like described.// --------------------------------------------------------------------
// Function: LinkOpen
//
// Initialize the DLL (these function will be called first ) and returns version
// info for logging ...
//
// Parameter: OUT: bstrVendor -> Vendor Archiveproduct
// OUT: bstrProductName -> Productname Archive
// OUT: bstrDLLVersion -> DLL Version String
// OUT: bstrDMSVersion -> DMS Version String
//
// Returncode: DMSRET_OK function sucessful
// --------------------------------------------------------------------
short CDMS::LinkOpen(BSTR *bstrVendor,BSTR *bstrProductName,BSTR *bstrDLLVersion, BSTR *bstrDMSVersion)
{
short nRetCode=DMSRET_OK;
CString csStr;
if (bstrVendor)
{
csStr="VendorName .....";
*bstrVendor=csStr.AllocSysString();
}
if (bstrProductName)
{
csStr="ProductName .....";
*bstrProductName=csStr.AllocSysString();
}
if (bstrDMSVersion)
{
csStr="DMSVersion .....";
*bstrDMSVersion=csStr.AllocSysString();
}
if (bstrDLLVersion)
{
csStr="SAPALINK.DLL Version 01.00";
*bstrDLLVersion=csStr.AllocSysString();
}
m_nRefCnt++;
return nRetCode;
}
// --------------------------------------------------------------------
// Function: LinkOpen
//
// Initialize the DLL (these function will be called first ) and returns version
// info for logging ...
//
// Parameter: OUT: bstrVendor -> Vendor Archiveproduct
// OUT: bstrProductName -> Productname Archive
// OUT: bstrDLLVersion -> DLL Version String
// OUT: bstrDMSVersion -> DMS Version String
//
// Returncode: DMSRET_OK function sucessful
// --------------------------------------------------------------------
short CDMS::LinkOpen(BSTR *bstrVendor,BSTR *bstrProductName,BSTR *bstrDLLVersion, BSTR *bstrDMSVersion)
{
//AppendCallToTextFile("LinkOpen");
short nRetCode=DMSRET_OK;
CString csStr;
if (bstrVendor)
{
csStr="KGS Software GmbH";
*bstrVendor=csStr.AllocSysString();
}
if (bstrProductName)
{
csStr="KGS-SAPALINK-Teststore";
*bstrProductName=csStr.AllocSysString();
}
if (bstrDMSVersion)
{
csStr="1.0.0.0.1";
*bstrDMSVersion=csStr.AllocSysString();
}
if (bstrDLLVersion)
{
csStr="KGS-SAPALINK-Teststore 1.0.0.0.1";
*bstrDLLVersion=csStr.AllocSysString();
}
m_nRefCnt++;
return nRetCode;
}
Configuration of KGS Generic Store Provider and usage of your SAPALink-implementation
Please note: All configurations done via WebGUI may also be done by using the config files.
First, please copy the following files to your <Tomcat installation directory>\bin folder:
SAPALINK.dll
The result of your compilation process of the implementation of the SAPALink-SDK.JavaDMSlink.dll
You may find this in <Unpacked ZIP archive>\SAPALink_SDK_v210H-2\CPlusPlus\
Please choose either the 32-bit or 64-bit version depending on your implementation and compilation.DMSException.class and SAPALinkDLL.class
You may find both here <Unpacked ZIP archive>\SAPALink_SDK_v210H-2\CPlusPlus\
After copying those files please make sure that your <Tomcat installation directory>\bin is part of the System variables → Path.
In order to add your bin-directory to the path please open the “Environment Variables”-menu by pressing the Windows-key + R and entering “rundll32.exe sysdm.cpl,EditEnvironmentVariables”.
This will open the Environment Variables window.
In the “System variables”-section click the Edit…-button. This will open the “Edit environment variable”-menu.
Highlighted “System variables-Edit…”-button |
---|
Within the opened menu click the New-button in order to add a new line and either type in the path or browser via the Browse…-button to the location of your Tomcat-bin-folder.
“Edit environment variable”-menu with highlighted and “New”-button and new line. |
---|
After making sure that the bin-directory is part of the System variable Path, please open the WebGUI of KGS ContentServer4Storage.
Within the WebGUI please click on the Configuration-submenu within OSGi.
Highlighted Configuration-submenu within OSGi-menu. |
---|
Within the Configuration-menu please click on the pencil-menu on the right-hand side of the Generic Store Service in order to open the configuration of the Generic Store Service.
Highlighted pencil-menu of the “Generic Store Service” |
---|
Within the configuration menu please follow these steps:
Make sure that the “Archive Link Implementation Class” is set to SAPALinkDLL
Let the “Implementation Folder” point to the Tomcat-bin-folder
Set the “Use internal Implementation” to False
“Generic Store Service”-configuration with highlighted sections and parameters |
---|
After configuring these, please restart the webserver.
Within the WebGUI please open the Main → ContentServer4ArchiveLink-menu. Here you should see the name of your company, the version number you entered as well as the name of the dms you chose.
Highlighted vendor, product name as well as version within ContentServer4ArchiveLink |
---|
Please note also the changes in the SAPALink Info (Main → SAPALink Info):
“SAPALink Info”-menu with highlighted vendor, product and class |
---|
|
The ArchiveLink command serverInfo should also return the assumed results:
http://localhost:8080/KGSAdmin-CS/contentserver?serverInfo&pVersion=0047&resultAs=ascii
Highlighted output of the “serverInfo”-request. |
---|
|