As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<alf:aspects> <alf:appliedAspects>P:cm:titled</alf:appliedAspects> <alf:appliedAspects>P:cm:taggable</alf:appliedAspects> <alf:properties> <cmis:propertyString propertyDefinitionId="cm:title" displayName="Title" queryName="cm:title"> <cmis:value>Test Document</cmis:value> </cmis:propertyString> <cmis:propertyId propertyDefinitionId="cm:taggable" displayName="Tags" queryName="cm:taggable"> <cmis:value>Node Type: {http://www.alfresco.org/model/content/1.0}category Node Ref: workspace://SpacesStore/efd2ef99-9a4b-45d4-b776-c79ff9bdcf7b</cmis:value> <cmis:value>Node Type: {http://www.alfresco.org/model/content/1.0}category Node Ref: workspace://SpacesStore/9fa79ae0-0139-4be8-917b-81d6efd9175b</cmis:value> </cmis:propertyId> </alf:properties> </alf:aspects>
org.springframework.extensions.webscripts.WebScriptException - 03260007 Wrapped Exception (with status template): 03260062 Error during processing of the template 'Error executing macro: typeuri required parameter: typedef is not specified.'. Please contact your system administrator.
import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.NameValuePair; import org.apache.commons.httpclient.methods.GetMethod; public class Test { public static void main(String[] args) { HttpClient client = new HttpClient(); GetMethod method = new GetMethod("http://localhost:8080/alfresco/service/api/login"); NameValuePair[] values = new NameValuePair[2]; values[0] = new NameValuePair("u", "{username}"); values[1] = new NameValuePair("pw", "{password}"); //http://localhost:8080/alfresco/service/api/login?u={username}&pw={login} //Same like getting the ticket, when requesting cmis service //Result will look so: http://localhost:8080/alfresco/service/api/login method.setQueryString(values); try { int statusCode = client.executeMethod(method); if(statusCode != HttpStatus.SC_OK) { System.out.println(method.getStatusText()); return; } System.out.println(method.getResponseBodyAsString(1000)); } catch(Exception e) { e.printStackTrace(); } finally { method.releaseConnection(); } } }