AnsweredAssumed Answered

Cmis checkin problem

Question asked by sharma.avtansh@gmail.com on Mar 23, 2016
Latest reply on Mar 24, 2016 by sharma.avtansh@gmail.com
Hi,

I am using widows server 2008 and alfresco Community - 5.0.0 (d r99759-b2). I have a constraint that I cannot use any library. Please suggest the solution and please update the file cmis-article given in sticky post for latest versions. Since you all well versed with the product but as a new comer it becomes very difficult when http urls are changing for every versions

I am using curl to post the request

curl -X POST -uadmin:admin "http://localhost:8080/alfresco/cmisatom/9e576c92-0890-4a49-af4f-eb2acdd478e7/c
hildren?id=workspace://SpacesStore/41c1dd8a-74ed-481f-907c-e0b18fcc7429&versioni
ngState=major" -H "Content-Type: application/atom+xml" -d @/createFile.atom.xml

I have tried the other way too

curl -X POST -uadmin:admin "http://localhost:8080/alfresco/cmisatom/9e576c92-0890-4a49-af4f-eb2acdd478e7/c
hildren?id=workspace://SpacesStore/41c1dd8a-74ed-481f-907c-e0b18fcc7429&versioni
ngState=major" -H "Content-Type: application/atom+xml" -d createFile.atom.xml


Content of file createFile.atom.xml is

<?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.txt</title>
<summary>A sample whitepaper named Sample A</summary>
<content type="application/text">
d2luZG93cwlhZG1pbmlzdHJhdG9yCWFkbWluQDEyMw0Kc3FsCXNhCXB3ZEAxMjMNCg0Kd2luLXB1cHQyOWhoMTg3
</content>
<cmisra:object>
<cmis:properties>
<cmis:propertyId
propertyDefinitionId="cmis:objectTypeId"><cmis:value>cmis:document</c
mis:value></cmis:propertyId>
</cmis:properties>
</cmisra:object>
</entry>

I am getting below 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–>Invalid XML!<!–/message–></p><hr noshade='noshade'/><!–stacktrace–><pre>
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Invalid XML!
   at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:95)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.dispatch(CmisAtomPubServlet.java:226)
   at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.service(CmisAtomPubServlet.java:173)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.repo.webdav.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:252)
   at sun.reflect.GeneratedMethodAccessor614.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:125)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at com.sun.proxy.$Proxy275.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.app.servlet.CmisSecurityContextCleanerFilter.doFilter(CmisSecurityContextCleanerFilter.java:49)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
   at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
   at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2139)
   at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2045)
   at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
   at org.apache.chemistry.opencmis.commons.impl.XMLUtils.next(XMLUtils.java:228)
   at org.apache.chemistry.opencmis.server.impl.atompub.AtomEntryParser.parse(AtomEntryParser.java:223)
   at org.apache.chemistry.opencmis.server.impl.atompub.ObjectService$Create.serve(ObjectService.java:96)
   at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:91)
   … 41 more

</pre><!–/stacktrace–><hr noshade='noshade'/></body></html>


Outcomes