AnsweredAssumed Answered

moveObject Service

Question asked by jbaldo on Jul 6, 2009
Latest reply on Aug 27, 2009 by syberyan
Hello,

I am trying to implement the moveObject CMIS service in Alfresco from Drupal but I don't see any documentation for it here:

http://localhost:8080/alfresco/service/index/family/CMIS

I'm using this XML as defined in the CMIS schema and the Alfresco CMIS Web Service WSDL:
 $postvars = '<?xml version="1.0" encoding="utf-8"?>' .
  '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://www.cmis.org/2008/05">' .
  '<cmis:moveObject>' .
      '<cmis:repositoryId>' . $repositoryId . '</cmis:repositoryId>' .
      '<cmis:objectId>' . $objId['noderef'] . '</cmis:objectId>' .
    '<cmis:targetFolderId>' . $targetId['noderef'] . '</cmis:targetFolderId>' .
    '<cmis:sourceFolderId>' . $sourceId['noderef'] . '</cmis:sourceFolderId>' .
  '</cmis:moveObject>' .
  '</entry>';

  $header[] = 'Content-type: application/atom+xml;type=entry';
  $header[] = 'Content-length: ' . strlen($postvars);
  $header[] = 'MIME-Version: 1.0';

This gives me a 405 error when I POST to the URL:

/api/node/{storeType}/{storeId}/{Id}
(where the Id belongs to the object being moved)

I'm guessing this is because the URL is incorrect.  Does anyone have a working example or know what the correct URL format is for moveObject requests?

Thanks for any help.

Outcomes