2011-04-12 68 views
0

我正在尝试使用基于REST的CMIS protocol签出文档,但我从服务器(Alfresco)收到错误。curl查询使用CMIS检出文档

我滥用卷曲吗? 或者我错过了我的要求?

curl --user admin:admin -F "[email protected]" http://localhost:8080/alfresco/service/cmis/checkedout 

随着atomentry.xml之中:

<?xml version="1.0" encoding="utf-8"?> 
<entry xmlns="http://www.w3.org/2005/Atom" 
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" 
xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"> 
<cmisra:object> 
<cmis:properties> 
<cmis:propertyId propertyDefinitionId="cmis:objectId"> 
<cmis:value>workspace://SpacesStore/3e13d089-39cf-48a4-b0b6-773b602bbcc0</cmis:value> 
</cmis:propertyId> 
</cmis:properties> 
</cmisra:object> 
</entry> 

回答

2

我错了既卷曲和XML ...这是什么工作:

curl -X POST -uadmin:admin "http://localhost:8080/alfresco/s/cmis/checkedout" -H "Content-Type:application/atom+xml;type=entry;charset=UTF-8" -d @atomentry.xml 

随着atomentry.xml之中:

<?xml version="1.0" encoding="utf-8"?> 
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"> 
<cmisra:object> 
<cmis:properties> 
<cmis:propertyId propertyDefinitionId="cmis:objectId"> 
<cmis:value>workspace://SpacesStore/3e13d089-39cf-48a4-b0b6-773b602bbcc0</cmis:value> 
</cmis:propertyId> 
</cmis:properties> 
</cmisra:object> 
</entry>