06-03-2009 05:02 AM
<?xml version='1.0' encoding='utf-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:cmis='http://www.cmis.org/2008/05'>
<title>This is a document</title>
<summary>Summary….</summary>
<content type="text">this is some more data</content>
<cmis:object>
<cmis:properties>
<cmis:propertyString cmis:name='ObjectTypeId'>
<cmis:value>document</cmis:value>
</cmis:propertyString>
</cmis:properties>
</cmis:object>
</entry>
XML;
$url = "http://localhost:8080/alfresco/service/api/path/workspace/SpacesStore/Company%20Home/children";
$creds = "admin:admin";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$curl_headers = array();
curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/atom+xml;type=entry", "Authorization: Basic " . base64_encode($creds) ));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // ask for results to be returned
// Send to remote and return data to caller.
$result = curl_exec($ch);
curl_close($ch);
06-03-2009 05:21 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.