Page 1 of 1

Custom Property Group values not being set

PostPosted:Wed Feb 29, 2012 2:17 pm
by Krishna Shiva
(159.19 KiB) Downloaded 867 times
Hello,

I am using OpenKM 5.1.9 for document management system. I am facing problems while we are adding values to the custom group properties from client code.

1. I am able to create folders and documents in the OpenKM using exposed webserivce methods.
2. I am able to register the custom groups to OpenKM.
3. I am able to pull these properties using the accessor methods of PropertyGroup.
4. When I try to set the values using mutator method of PropertyGroup, I get the following error:
Code: Select all
18:25:03,810 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
        com.openkm.core.ParseException: Unknown property definition: okp:folder.owner
        at com.openkm.module.base.BasePropertyGroupModule.setPropertyValue(BasePropertyGroupModule.java:95)
        at com.openkm.module.direct.DirectPropertyGroupModule.setProperties(DirectPropertyGroupModule.java:389
        at com.openkm.ws.endpoint.OKMPropertyGroup.setProperties(OKMPropertyGroup.java:143)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Would be great if somone could help me out in resolving the issue of setting the custom property group values to the folders, documents etc.,

Please find the code snippets, captured error screenshots, config files that I have used as an attachment.

Thanks in advance. Looking forward for earliest response as I need to meet the deadline.

Regards,
Krishna

Re: Custom Property Group values not being set

PostPosted:Thu Mar 01, 2012 5:45 am
by okmuser
Did you try with some values on the input field.

Re: Custom Property Group values not being set

PostPosted:Thu Mar 01, 2012 6:16 am
by Krishna Shiva
Yes, I tried with the values.

Re: Custom Property Group values not being set

PostPosted:Fri Mar 02, 2012 9:45 am
by Krishna Shiva
Resolved... Able to set the property values.

Debugged the openkm source code. (Thanks for the detailed documentation of setting the openkm source code as a project).

I had to add the type of class that a property holds in PropertyGroups.xml.
e.g If the property is of type input, i have to pass "com.openkm.bean.form.Input" as a string in FormElementComplex.setObjClass method.
Code: Select all
OKMPropertyGroupServiceStub.FormElementComplex complexObj = new OKMPropertyGroupServiceStub.FormElementComplex();
		complexObj.setName(key);
		complexObj.setValue(data);
		complexObj.setObjClass("com.openkm.bean.form.Input");
Similarly, com.openkm.bean.form.TextArea for textarea, com.openkm.bean.form.CheckBox for checkbox.....

Regards,
Krishna

Re: Custom Property Group values not being set

PostPosted:Sat Mar 10, 2012 8:09 am
by pheobe green
Krishna Shiva wrote:Yes, I tried with the values.
There is no disputing about tastes

Re: Custom Property Group values not being set

PostPosted:Sat Mar 10, 2012 3:58 pm
by pavila
Take a look at sample code at http://wiki.openkm.com/index.php/Webservices_Guide. In the PHP section you can find a setProperties() sample.