09-27-2007 09:57 AM
<model name="s:simpleModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<imports>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
</imports>
<namespaces>
<namespace uri="http://example.com/model/mymodel/simple" prefix="s" />
</namespaces>
<data-types>
<data-type name="sN">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="sH">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.AlfrescoStandardAnalyser</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
</data-types>
<types>
<type name="s:myObject">
<parent>cm:content</parent>
<properties>
<property name="s:AccessionNumber">
<type>sH</type>
</property>
<property name="satientName">
<type>sN</type>
</property>
</properties>
</type>
</types>
</model>
String SIMPLE="http://example.com/model/mymodel/simple";
Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
ParentReference pr = new ParentReference(STORE, null, compHome.getReference().getPath(), Constants.ASSOC_CONTAINS, Constants.createQNameString(SIMPLE, "testobj1"));
nameValue = Utils.createNamedValue(Constants.PROP_NAME, "My Test Object 1");
accNumberValue = Utils.createNamedValue(Constants.createQNameString(SIMPLE, "AccessionNumber"), "123456acc1");
patientNameValue =
Utils.createNamedValue(Constants.createQNameString(SIMPLE, "PatientName"), "John Doe");
contentProps = new NamedValue[] {nameValue, accNumberValue, patientNameValue};
createObj = new CMLCreate("ref1", pr, null, null, null, Constants.createQNameString(SIMPLE, "myObject"), contentProps);
cml = new CML();
cml.setCreate(new CMLCreate[] {createObj});
results = repoSvc.update(cml);
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
{http://www.alfresco.org/ws/service/repository/1.0}RepositoryFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>org.alfresco.error.AlfrescoRuntimeException: Property type not recognised:
type: {http://example.com/model/mymodel/simple}SH</ns1:message>
{http://xml.apache.org/axis/}exceptionNamerg.alfresco.repo.webservice.repository.RepositoryFault
{http://xml.apache.org/axis/}stackTrace:
at org.alfresco.repo.webservice.repository.RepositoryWebService.update(RepositoryWebService.java:518)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
…
09-28-2007 05:00 AM
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.