04-20-2010 06:44 PM
04-26-2010 05:54 PM
<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.
05-27-2010 08:57 AM
05-27-2010 10:46 AM
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();
}
}
}
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.