curl查询以使用CMIS签出文档 [英] curl query to check out a document using CMIS

查看:104
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆