Hi Domenico,
Could you please open an issue [1] and attach some client code to
reproduce it?
If we can reproduce it with the OpenCMIS InMemory repository, then we
can look into it. If not, we have to forward it to Alfresco.
Btw. Use the browser binding. It doesn't solve your problem, but it's
faster. ;-)
- Florian
[1] https://issues.apache.org/jira/browse/CMIS
Hi All,
I'm trying to retrieve the content of a file present on my Alfresco
system thought the Apache Chemistry OpenCMIS in my Java Web
Application.
But when I invoke the getContentStream() method on the
org.apache.chemistry.opencmis.client.api.Document interface and the
document filename contains the character “-“ (upper score), I
receive the following stack trace:
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException:
Bad Request
org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:490)
org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getContentStream(ObjectServiceImpl.java:617)
org.apache.chemistry.opencmis.client.runtime.SessionImpl.getContentStream(SessionImpl.java:1454)
org.apache.chemistry.opencmis.client.runtime.DocumentImpl.getContentStream(DocumentImpl.java:396)
org.apache.chemistry.opencmis.client.runtime.DocumentImpl.getContentStream(DocumentImpl.java:380)
jp.aegif.struts2cmisexplorer.opencmisbinding.OpenCMISRepositoryClientFacade.getDocument(OpenCMISRepositoryClientFacade.java:227)
jp.aegif.struts2cmisexplorer.struts2actions.SendFileAction.execute(SendFileAction.java:55)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
Debugging the
org.apache.chemistry.opencmis.client.runtime.DocumentImpl class, and
in particular the
org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getContentStream()
method, in the returned link object, the “-“ char it’s
translated in “%5Cu†(before it’s translated in “\u†and then
the URL Encodig transform it to “%5Cuâ€).
If I replace the “%5Cu†with the original “-“ char, all work
perfectly.
Following the details about my test environment:
org.apache.chemistry.opencmis v 0.14.0
JDK 1.8.0_91 64bit
Tomcat 7.0.69
Alfresco 5.0.d
Any idea about this issue?
Any suggestions will be appreciated.
Thanks in advance for any hints. Best regards.
Domenico