Hello,
I'm trying to upload documents with Talend. I can set the ObjectTypeIds with a POST but I have no clue how to access the cmis:secondaryObjectTypeIds. I keep getting
{ "exception": "invalidArgument", "message": "magda:customerFirstName is unknown!", }
This is what I post as a test
These are the properties in CMIS Workbench
Any ideas how to populate them?
TIA
Jonathan
Solved! Go to Solution.
Aspects are represented as arrays.
Try this approach:
Before adding a value for a property in a secondary type (called aspect in Alfresco), you need to add the secondary type itself.
The property cmis:secondaryObjectTypeIds includes a list with all the supported secondary types, so I guess that you need to get the original list and then add the value you need (magda:recipientEmail) to the list for the property in the POST request.
Hello @angelborroy (Was just using your postman file after reading your blog)
This is what I see in CMIS Workbench
I see that the Object Type ID is also D:magda:invoice which I use when I upload.
I tried this in Postman
But still ObjectNotFound
Try using "P:magda:recipientEmail" instead of "magda:recipientEmail" in the property value.
"Worked" since I'm getting a different error message now.
"message": "Constraint violation: 09180164 Found 4 integrity violations: Mandatory aspect not set: Node: workspace://SpacesStore/7949ebf7-3bd9-4618-8703-b3394ba54e2b Type: {http://www.domain.be/model/content/magda/1.0}invoice
Aspect: {http://www.domain.be/model/content/magda/1.0}customer
Mandatory aspect not set:
Node: workspace://SpacesStore/7949ebf7-3bd9-4618-8703-b3394ba54e2b
Type: {http://www.domain.be/model/content/magda/1.0}invoice
Aspect: {http://www.domain.be/model/content/magda/1.0}recipient
Mandatory aspect not set: Node: workspace://SpacesStore/7949ebf7-3bd9-4618-8703-b3394ba54e2b Type: {http://www.domain.be/model/content/magda/1.0}invoice Aspect: {http://www.domain.be/model/content/magda/1.0}payment Mandatory aspect not set: Node: workspace://SpacesStore/7949ebf7-3bd9-4618-8703-b3394ba54e2b Type: {http://www.domain.be/model/content/magda/1.0}invoice Aspect: {http://www.domain.be/model/content/magda/1.0}delivery",
I tried to add the aspects with no luck
Then I tried like this
But then I get
exception": "invalidArgument", "message": "magda:customerFirstName is unknown!",
How do I add multiple aspects?
Edit: Reading about this on https://docs.alfresco.com/content-services/6.1/develop/reference/cmis-ref/#browserbinding
Aspects are represented as arrays.
Try this approach:
Success!
I tried that as well but was using the postman-echo.com
Thank you! :-)
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.