Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

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.exe

    • SAPALINKTEST.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
// --------------------------------------------------------------------
// 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;
}

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).

 Sample implementation of LinkOpen
// --------------------------------------------------------------------
// 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;
}

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.

asdf

  • No labels