curl查询以使用CMIS签出文档

编程入门 行业动态 更新时间:2024-10-27 04:31:45
本文介绍了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" localhost:8080/alfresco/service/cmis/checkedout

atomentry.xml为:

With atomentry.xml being:

<?xml version="1.0" encoding="utf-8"?> <entry xmlns="www.w3/2005/Atom" xmlns:cmisra="docs.oasis-open/ns/cmis/restatom/200908/" xmlns:cmis="docs.oasis-open/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 "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="www.w3/2005/Atom" xmlns:cmisra="docs.oasis-open/ns/cmis/restatom/200908/" xmlns:cmis="docs.oasis-open/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签出文档

本文发布于:2023-11-28 10:29:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642030.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文档   curl   CMIS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!