Integrating into the KnowledgeTree web service
April 30, 2007 – 11:12 amThe latest development release of KnowledgeTree, 3.4.5 DEV, now exposes a SOAP web service. This is opens up the platform so that 3rd parties can easily integrate their applications into the document repository.
Documentation can be found at http://docs.knowledgetree.com.
A quick start guide is provided with a quick overview of the functionality available. As part of the development we have encapsulated the core KnowledgeTree functionality into an object model making it possible to separating much of the core logic away for the user interface, making the web service possible. This object model is found in the directory source/ktapi folder.
Furthermore, an object model was developed for the web service layer, closely resembling the structure provided by the core object model. With the help of the community, we hope to port the web service object model to different languages. The key concepts behind the web service object model in the long term is to provide an infrastructure that logically resembles the object model on the KnowledgeTree core, but will provide caching capabilities and better validation mechanisms so that server side processing can be minimised.
Currently, a PHP version of the web service object model is provided. Development on a C# .NET version is underway and will be available shortly. The web service object model for various languages is found in the source/ktwsapi folder.
Example of adding a document to the repository
The following sample illustrates the process of adding a document to the Knowledge Tree repository via the PHP web service object model.
require_once('../ktwsapi.inc.php');
$ktapi = new KTWSAPI('http://ktdms/ktwebservice/?wsdl’);
$ktapi->start_session(’admin’,'admin’);
// get a reference to the folder we want to work on
$root = $ktapi->get_root_folder();
// adds a document to the root folder
$root->add_document('c:/temp/test.doc');
$ktapi->logout();
|


reddit