Page 1 of 1

Webservice how add property method

PostPosted:Fri Oct 15, 2010 10:53 am
by nannicini
Hi,
I use a web service to add document to KM by a php script .
I would like to add property too by my php script.

I defined in PropertyGroups.cnd and PropertyGroups.xml the fields
Code: Select all
[okg:invoice] mixin
- okp:fatture.nfattura (string) = '' autocreated
- okp:fatture.sezionale (string) = '' autocreated
- okp:fatture.datafattura (string) = '' autocreated
- okp:fatture.codicefiscale (string) = '' autocreated
- okp:fatture.importototale (string) = '' autocreated
- okp:fatture.esecutore (string) = '' autocreated
- okp:fatture.note (string) = '' autocreated
and imported from web administration interfaces with no error.

Which method i can use to add the values according to the fileds?
Thanks...

Re: Webservice how add property method

PostPosted:Sat Oct 16, 2010 7:42 am
by jllort
take a look here:

http://openkm.svn.sourceforge.net/viewv ... /endpoint/

At Property group class

Re: Webservice how add property method

PostPosted:Sat Oct 16, 2010 10:49 am
by nannicini
Hi,
thank you for the answer.
I am i newbie with the Java Servlet.
The code implements the webservice that a need but this java code file have to be installed on Jboss server i think....
Probably i have to change same config file to public webservice?

Help please...

Re: Webservice how add property method

PostPosted:Sat Oct 16, 2010 11:59 am
by jllort
No no, no :)

Take a look at our wiki at http://wiki.openkm.com/index.php/Webservices_Guide

You must generate webservices java class for http://localhost:8080/OpenKM/OKMPropertyGroup?wsdl ( it's not present on wiki, because we've still not yet finished upgrading documentation to version 5.x )

In java example it's well explained how generate it, and there's some simple examples ( not for property groups, but it'll be so usefull for what are you looking for too ).

Re: Webservice how add property method

PostPosted:Tue Oct 19, 2010 7:32 am
by nannicini
Ok.
Now i can Use OKMPropertyGroup Webservice.
I can add a document to a group and to remove too according my .cnd and .xml definition.
Code: Select all
try {
 $addgroup = $OKMPropertyGroup->addGroup($token,$pathfile,'okg:fatture');
} catch (Exception $e) {
    echo format_exception($e);
  }
I need to change the value of the property by php script.
I try to use OKMDocument webservice but i can see only the main properties.

How can i change custom properties value using webservices?

Thanks a lot

Re: Webservice how add property method

PostPosted:Thu Oct 21, 2010 10:27 am
by pavila
According to http://wiki.openkm.com/index.php/OKMPropertyGroup, you can use the setProperties method.