AnsweredAssumed Answered

CMIS 1.1 atom binding

Question asked by pdigumarthi on Feb 19, 2014
Latest reply on Mar 4, 2014 by jpotts
Hi,

I am trying to create a document using the cmis 1.1 services

I have used the following URL and doing a http POST request  { I am trying to do this from Advance rest client }

http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/children

and using the following atom.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">
<title>sample-a.doc</title>
<summary>A sample whitepaper named Sample A</summary>
<content type="application/msword">
UEsDBBQABgAIAAAAIQAJJIeCg   …….   …=
</content>
<cmisra:object>
<cmis:properties>
<cmis:propertyId propertyDefinitionId="cmis:objectTypeId"><cmis:value>cmis:document</cmis:value></cmis:propertyId>
<cmis:propertyId propertyDefinitionId="cmis:name"><cmis:value>xgyy.doc</cmis:value></cmis:propertyId>
</cmis:properties>
</cmisra:object>
</entry>


I am getting the following error.

<html><head><title>Apache Chemistry OpenCMIS - invalidArgument error</title><style><!–H1 {font-size:24px;line-height:normal;font-weight:bold;background-color:#f0f0f0;color:#003366;border-bottom:1px solid #3c78b5;padding:2px;} BODY {font-family:Verdana,arial,sans-serif;color:black;font-size:14px;} HR {color:#3c78b5;height:1px;}–></style></head><body><h1>HTTP Status 400 - <!–exception–>invalidArgument<!–/exception–></h1><p><!–message–>Properties must be set!<!–/message–></p><hr noshade='noshade'/><!–stacktrace–><pre>
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Properties must be set!
   at org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.checkProperties(CmisServiceWrapper.java:210)
   at org.apache.chemistry.opencmis.server.support.CmisServiceWrapper.create(CmisServiceWrapper.java:698)
   at org.apache.chemistry.opencmis.server.impl.atompub.ObjectService$Create.serve(ObjectService.java:102)
   at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:88)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.dispatch(CmisAtomPubServlet.java:225)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.service(CmisAtomPubServlet.java:172)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
   at org.alfresco.opencmis.CMISServletDispatcher.execute(CMISServletDispatcher.java:173)
   at org.alfresco.opencmis.CMISWebScript.execute(CMISWebScript.java:51)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:377)
   at org.alfresco.rest.api.PublicApiRepositoryContainer.transactionedExecute(PublicApiRepositoryContainer.java:45)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:529)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:341)
   at uorg.alfresco.rest.api.PublicApiRepositoryContainer.access$001(PublicApiRepositoryContainer.java:26)
   at org.alfresco.rest.api.PublicApiRepositoryContainer$1.doWork(PublicApiRepositoryContainer.java:81)
   at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:119)
   at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:88)
   at org.alfresco.rest.api.PublicApiRepositoryContainer.executeScript(PublicApiRepositoryContainer.java:77)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.alfresco.repo.web.scripts.TenantWebScriptServlet.service(TenantWebScriptServlet.java:74)
   at org.alfresco.rest.api.PublicApiWebScriptServlet.service(PublicApiWebScriptServlet.java:53)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)




Also please let me know how can  I figure out what is the structure of Atom or JASON for different requets, say create folder , get Document etc.

The need here is we dont want to use the Java API , instead just call the CMIS rest API's

Outcomes