11-25-2011 08:46 AM
Abdera abdera = new Abdera();
AbderaClient client = new AbderaClient(abdera);
InputStream is = Utilidades.stringToInputStream(""); //Personal method
ClientResponse resp =
client.post("http://localhost:8080/alfresco/service/cmis/s/SpaceStore/id_parent_folder/children +
"?alf_ticket=ticket", is2);
// OR
ClientResponse resp =
client.post("http://localhost:8080/alfresco/service +
"/cmis" +
"/s/SpaceStore" +
"/p/One/Two/Three" +
"/children" +
"?alf_ticket=ticket", is2);
400 Description: Request sent by the client was syntactically incorrect.
Message:Posting of media resource not supported
Community v3.4.0 (d 3370) schema 4.113
Diagnostics:Inspect Web Script (org/alfresco/cmis/children.post)
11-28-2011 06:23 AM
Abdera abdera = new Abdera();
AbderaClient client = new AbderaClient(abdera);
Feed feed = abdera.newFeed();
String uri = "http://localhost:8080/alfresco/service/cmis/s/SpaceStore/p/One/Two/Three/children?alf_ticket='+my_ti...;
Factory factory = abdera.getFactory();
Entry entry = factory.newEntry();
entry.setTitle("Four");
entry.setSummary("Folder Four");
RequestOptions options = new RequestOptions();
options.setHeader("Content-Type", "application/atom+xml");
options.setHeader("type", "entry");
ClientResponse resp = client.post(uri, entry, options);
11-29-2011 10:13 AM
public static final String NS_CMIS_RESTATOM = "http://docs.oasis-open.org/ns/cmis/restatom/200908/";
public static final String CMISRA = "cmisra";
public static final String NS_CMIS_CORE = "http://docs.oasis-open.org/ns/cmis/core/200908/";
public static final String CMIS = "cmis";
….
Abdera abdera = new Abdera();
AbderaClient client = new AbderaClient(abdera);
Feed feed = abdera.newFeed();
String uri = "http://localhost:8080/alfresco/service/cmis/s/SpaceStore/p/One/Two/Three/children?alf_ticket='+my_ti...;
Factory factory = abdera.getFactory();
Entry entry = factory.newEntry();
entry.setTitle("Four");
entry.setSummary("Folder Four");
ExtensibleElement objElement = entry.addExtension(NS_CMIS_RESTATOM, "object", CMISRA);
ExtensibleElement propsElement = objElement.addExtension(NS_CMIS_CORE, "properties", CMIS);
ExtensibleElement stringElement = propsElement.addExtension(NS_CMIS_CORE, "propertyId", CMIS);
stringElement.setAttributeValue("propertyDefinitionId","cmis:objectTypeId");
Element valueElement = stringElement.addExtension(NS_CMIS_CORE, "value", CMIS);
valueElement.setText("cmis:folder");
RequestOptions options = new RequestOptions();
options.setHeader("Content-Type", "application/atom+xml");
options.setHeader("type", "entry");
ClientResponse resp = client.post(uri, entry, options);
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.