Hello i'm new using Openkm.
I'm already install Lates version Openkm profesional Trial.
i try the tutorial
https://www.openkm.com/wiki/index.php/P ... OpenKM_6.2
this tutorial List folders and documents
when i try this code i have found error
I'm already install Lates version Openkm profesional Trial.
i try the tutorial
https://www.openkm.com/wiki/index.php/P ... OpenKM_6.2
this tutorial List folders and documents
when i try this code i have found error
Code: Select all
This result code : <?php
function printFolder($folder) {
echo "[FOLDER] Path: ".$folder->path.", Author: ".$folder->author."<br>";
}
function printDocument($document) {
echo "[DOCUMENT] Path: ".$document->path.", Author: ".$document->author.", Size: ".$document->actualVersion->size."<br>";
}
// Register WSDL
$OKMAuth = new SoapClient('http://localhost:8080/OpenKM/services/OKMAuth?wsdl');
$OKMDocument = new SoapClient('http://localhost:8080/OpenKM/services/OKMDocument?wsdl');
$OKMFolder = new SoapClient('http://localhost:8080/OpenKM/services/OKMFolder?wsdl');
$path = '/okm:root';
// Login
$loginResp = $OKMAuth->login(array('user' => 'okmAdmin', 'password' => 'admin'));
$token = $loginResp->return;
echo "Token: ".$token."<br>";
echo "Path: ".$path."<br>";
// List folders
$getChildrenResp = $OKMFolder->getChildren(array('token' => $token, 'fldPath' => $path));
$folderArray = $getChildrenResp->return;
if ($folderArray) {
if (is_array($folderArray)) {
foreach ($folderArray as $folder) {
printFolder($folder);
}
} else {
printFolder($folderArray);
}
}
// List documents
$getChildrenResp = $OKMDocument->getChildren(array('token' => $token, 'fldPath' => $path));
$documentArray = $getChildrenResp->return;
if ($documentArray) {
if (is_array($documentArray)) {
foreach ($documentArray as $document) {
printDocument($document);
}
} else {
printDocument($documentArray);
}
}
// Logout
$OKMAuth->logout(array('token' => $token));
?>
Token: 15f9ebf3-4ab3-48bd-932f-f9ea7e918211i want show my folder and document in OpenKM, previously i'm already search in google but i can't found this solution. I don't know how to fix it, help me thank's
Path: /okm:root
Fatal error: Uncaught SoapFault exception: [soap:Server] Fault occurred while processing. in C:\xampp\htdocs\web_dms\home.php:28 Stack trace: #0 C:\xampp\htdocs\web_dms\home.php(28): SoapClient->__call('getChildren', Array) #1 C:\xampp\htdocs\web_dms\home.php(28): SoapClient->getChildren(Array) #2 {main} thrown in C:\xampp\htdocs\web_dms\home.php on line 28