I try to change main value by webservice according with documentation example to a document that has been previously uploaded.
I try to change KEYWORDS value by setProperties method
this is the simple script:
Exception: java.lang.NullPointerException
Probably i send a wrong $doc array? I need to send a StdClass Object?
Please help me....
I try to change KEYWORDS value by setProperties method
this is the simple script:
Code: Select all
The script return <?
$user = "okmAdmin";
$pass = "admin";
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$OKMAuth = new SoapClient('http://192.168.0.25:8080/OpenKM/OKMAuth?wsdl',
array('proxy_host' => "192.168.0.25", 'proxy_port' => 8080));
$OKMDocument = new SoapClient('http://192.168.0.25:8080/OpenKM/OKMDocument?wsdl',
array('proxy_host' => "192.168.0.25", 'proxy_port' => 8080));
$token = $OKMAuth->login('okmAdmin','admin');
$dms_path="/okm:root/ambulatorio/pazienti/consensiprivacy/pg_0001.pdf";
$properties=$OKMDocument->getProperties($token,$dms_path);
print_r($properties);
$doc = array('path' => $dms_path, 'mimeType' => null,
'actualVersion' => null, 'author' => Admin, 'checkedOut' => false,
'keywords' => 'CHANGEDVALUE', 'language' => null,
'lastModified' => null, 'lockInfo' => null, 'locked' => false,
'permissions' => 0, 'size' => 0, 'subscribed' => false,
'convertibleToPdf' =>0,
'convertibleToSwf' =>0);
try {
$OKMDocument->setProperties($doc);
} catch (Exception $e) {
echo format_exception($e);
}
$OKMAuth->logout($token);
function format_exception($e) {
if (isset($e->detail)) {
$reflectionObject = new ReflectionObject($e->detail);
$properties = $reflectionObject->getProperties();
$exceptionName = $properties[0]->name;
} else {
$exceptionName = "Exception";
}
return $exceptionName.": ".$e->faultstring;
}
?>
Exception: java.lang.NullPointerException
Probably i send a wrong $doc array? I need to send a StdClass Object?
Please help me....