Views:

Question:
How can I create a URL Integration link besides using the "manual way" by entering the necessary information in the URL Creator?

Answer:
Starting with DocuWare 6.7 you can install the "DocuWare PowerTools" using the setup. This tool package contains the URL Creator, but additionally you will find in the installation directory the file "DocuWare.WebIntegration.dll".
This file can be used in a .NET project to use nearly the same objects and methods as you may be used to from the GAPI.
Below you will find a code sample how to use the namespace "DocuWare.WebIntegration"

//Prepare DWIntegrationURL
DWIntegrationInfo integrationInfo = new DWIntegrationInfo("http://presentationvm/DocuWare/Platform/WebClient", 1, false);
integrationInfo.Scheme = "http";
integrationInfo.OrganizationId = "1";

//Example 1: Generate URL plain text
DWIntegrationUrl plaintextURL = new DWIntegrationUrl(integrationInfo, IntegrationType.Viewer);
plaintextURL.Parameters.FileCabinetGuid = new Guid("366f6b7f-af2b-47ac-8ee7-01dbb2211576");
//plaintextURL.Parameters.DocId = "837";
plaintextURL.Parameters.Query = "[COMPANY] = \"Peters Engineering\" AND [DOCTYPE] = \"Invoice in\"";
plaintextURL.Parameters.UserCredentials = new UserCredentials("admin", "admin");

Console.WriteLine("Plain text URL:");
Console.WriteLine(plaintextURL.Url.ToString());

//Example 2: Generate encrypted URL
DWIntegrationUrlEncrypted encryptedURL = new DWIntegrationUrlEncrypted(integrationInfo, IntegrationType.Viewer, "123MyPassphrase!");
encryptedURL.Parameters.FileCabinetGuid = new Guid("366f6b7f-af2b-47ac-8ee7-01dbb2211576");
encryptedURL.Parameters.DocId = "1";
encryptedURL.Parameters.UserCredentials = new UserCredentials("admin", "admin");

Console.WriteLine("Encrypted URL:");
Console.WriteLine(encryptedURL.Url.ToString());

//Example 3: Generate Login URL
DWWebUrlLoginParameters loginParams = new DWWebUrlLoginParameters();
loginParams.UserCredentials = new UserCredentials("admin", "admin");
DWWebClientLoginUrlEncrypted loginUrl = new DWWebClientLoginUrlEncrypted(integrationInfo, loginParams, "123MyPassphrase!");

Console.WriteLine("Login URL:");
Console.WriteLine(loginUrl.Url.ToString());
Console.ReadLine();

Comments (0)