09-04-2009 05:17 AM
<type name="ma:document">
<title>Dokument</title>
<parent>cm:folder</parent>
<properties>
<property name="ma:docPersonId">
<title>Personen-IDs</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
<property name="ma:docOrganisationId">
<title>Einrichtungs-IDs</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
<property name="ma:docClassificationId">
<title>Klassifikations-IDs</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
</properties>
</type>
CmisPropertyString classificationProperty = new CmisPropertyString();
classificationProperty.setName(DOCUMENT_CLASSIFICATION_ID);
for (Classification classification : document.getClassifications()) {
classificationProperty.getValue().add(classification.getUuid());
}
javax.xml.ws.soap.SOAPFaultException: Runtime error. Message: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
01-16-2010 08:23 AM
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at org.alfresco.repo.cmis.ws.utils.PropertyUtil.checkProperty(PropertyUtil.java:488)
at org.alfresco.repo.cmis.ws.utils.PropertyUtil.setProperties(PropertyUtil.java:395)
at org.alfresco.repo.cmis.ws.DMObjectServicePort.updateProperties(DMObjectServicePort.java:658)
01-18-2010 04:11 PM
— PropertyUtil.java 2009-10-31 06:47:36.000000000 +0100
+++ /home/kbryd/work/alfresco/remote-api-3.2r2/java/org/alfresco/repo/cmis/ws/utils/PropertyUtil.java 2010-01-17 21:29:28.872800626 +0100
@@ -485,13 +485,23 @@
{
case STRING:
{
- checkStringProperty(propertyDefinition, propertyName, (String) value);
+ if(value instanceof Collection) {
+ Collection<String> c = (Collection)value;
+ for(String s : c)
+ checkStringProperty(propertyDefinition, propertyName, s);
+ } else
+ checkStringProperty(propertyDefinition, propertyName, (String) value);
break;
}
case INTEGER:
case DECIMAL:
{
- checkNumberProperty(propertyDefinition, propertyName, (Number) value);
+ if(value instanceof Collection) {
+ Collection<Number> c = (Collection)value;
+ for(Number s : c)
+ checkNumberProperty(propertyDefinition, propertyName, s);
+ } else
+ checkNumberProperty(propertyDefinition, propertyName, (Number) value);
break;
}
}
@@ -558,7 +568,6 @@
{
String typeId = properties.get(CMISDictionaryModel.PROP_OBJECT_TYPE_ID) != null ? properties.get(CMISDictionaryModel.PROP_OBJECT_TYPE_ID).toString() : null;
CMISTypeDefinition type = cmisDictionaryService.findType(typeId);
-
if (null == type)
{
throw cmisObjectsUtils.createCmisException(("Type with " + typeId + " typeId was not found"), EnumServiceException.RUNTIME);
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.