curl查询以使用CMIS协议检出文档 [英] curl query to check out a document using the CMIS protocol
本文介绍了curl查询以使用CMIS协议检出文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用基于REST的 CMIS协议签出文档,但我收到来自服务器的错误( Alfresco )。
I am trying to checkout a document using the REST-based CMIS protocol, but I get an error from the server (Alfresco).
我误用卷曲吗?
或者我在我的请求中缺少什么?
Am I misusing curl? Or am I missing something in my request?
curl --user admin:admin -F "atomentry=@atomentry.xml" http://localhost:8080/alfresco/service/cmis/checkedout
atomentry.xml为:
With atomentry.xml being:
<?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>
推荐答案
curl和XML都错了。 。这里是什么工作:
I was wrong with both curl and the XML... here is what worked:
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为:
With atomentry.xml being:
<?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>
这篇关于curl查询以使用CMIS协议检出文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文