02-10-2020 03:11 AM
Hi everybody, I'm new to Alfresco. I need a solution to be able to communicate alfresco with spring boot so I need a solution rest api that I can download and update file on my application spring and saved it in alfresco
02-10-2020 03:52 AM
This is a sample using Spring Boot and CMIS REST API:
https://github.com/aborroy/cmis-associations-alfresco
You can adapt it in order to use the REST API (https://api-explorer.alfresco.com/api-explorer/)
02-10-2020 03:52 AM
This is a sample using Spring Boot and CMIS REST API:
https://github.com/aborroy/cmis-associations-alfresco
You can adapt it in order to use the REST API (https://api-explorer.alfresco.com/api-explorer/)
02-10-2020 04:25 AM
thank you for this solution but I received this problem:
No active profile set, falling back to default profiles: default
Started App in 0.863 seconds (JVM running for 1.6)
--Creating documents...
created document A 48a7b390-4905-4e81-a2a2-a82ff8e138fe;1.0
created document B c17518eb-e9ce-42f8-822a-63200099a238;1.0
--Setting aspects...
Application run failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:821)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:802)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:341)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265)
at org.alfresco.cmis.assoc.App.main(App.java:34)
Caused by: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Type 'P:cmisassoc:relationable' is unknown!
at org.apache.chemistry.opencmis.client.bindings.spi.browser.AbstractBrowserBindingService.convertStatusCode(AbstractBrowserBindingService.java:296)
at org.apache.chemistry.opencmis.client.bindings.spi.browser.AbstractBrowserBindingService.read(AbstractBrowserBindingService.java:410)
at org.apache.chemistry.opencmis.client.bindings.spi.browser.AbstractBrowserBindingService.getTypeDefinitionInternal(AbstractBrowserBindingService.java:518)
at org.apache.chemistry.opencmis.client.bindings.spi.browser.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:82)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:153)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:131)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:836)
at org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertProperties(ObjectFactoryImpl.java:439)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.updateProperties(AbstractCmisObject.java:398)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.updateProperties(AbstractCmisObject.java:360)
at org.alfresco.cmis.assoc.service.CmisService.addAspect(CmisService.java:117)
at org.alfresco.cmis.assoc.App.run(App.java:47)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:818)
... 5 common frames omitted
02-10-2020 04:34 AM
As I said, that is a sample Spring Boot application using CMIS REST API. As it's using "cmisassoc:relationable" aspect, it will fail if you haven't deployed that custom model in your Repository. You just need to replace the CMIS REST API client with your Alfresco REST API client.
02-10-2020 11:14 AM
hello ; is there a front part corresponding to the backend spring boot part??
02-11-2020 09:32 AM
do you have an explication which i can change the CMIS REST API client with my alfresco REST API !
Explore our Alfresco products with the links below. Use labels to filter content by product module.