OKMDocument -> getProperties()
PostPosted:Mon Feb 11, 2013 9:55 pm
Is the output (Document) of the getProperties method an object? What is the property name for the MIME type?
get_object_vars() should return all of the object properties in an array, and array_values() should list the values of the array, but the returned output is "Array". Not sure if that is a failure of my php coding skills, or if I'm misinterpreting the return type of getProperties. Any help is appreciated.
get_object_vars() should return all of the object properties in an array, and array_values() should list the values of the array, but the returned output is "Array". Not sure if that is a failure of my php coding skills, or if I'm misinterpreting the return type of getProperties. Any help is appreciated.
Code: Select all
<?php
// Register WSDL
$OKMAuth = new SoapClient('http://OpenKM:8080/OpenKM/services/OKMAuth?wsdl');
$OKMDocument = new SoapClient('http://OpenKM:8080/OpenKM/services/OKMDocument?wsdl');
// Login
$loginResp = $OKMAuth->login(array('user' => 'okmAdmin', 'password' => 'admin'));
$token = $loginResp->return;
//open document test
$docPath = '/okm:root/Customer Docs/olsonea@gmail.com/Invoice-0000034.pdf';
//get document properties
$docProperties = $OKMDocument->getProperties(array('token' => $token, 'docPath' => $docPath));
$properties = get_object_vars($docProperties);
echo array_values($properties);
// Logout
$OKMAuth->logout(array('token' => $token));
?>