Creating Content with OpenCMIS

cancel
Showing results for 
Search instead for 
Did you mean: 
YanFeiHu
Member II

Creating Content with OpenCMIS

Jump to solution

Hi Team;

      Where to create the object of 'SomeCo'? 

      Please see the picture as below. 

      The URL as follow;

      "https://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html"

      Thanks a lot!

SomeCo.png

1 Solution

Accepted Solutions
abhinavmishra14
Advanced

Re: Creating Content with OpenCMIS

Jump to solution

The error is because, it is expected that the folder already exists. You need to create the folder and then try it. You can use a site based folder or repository as well. e.g. Repository > SomeCo

Repository is already represented as "/". Means its the root. 
 
java SomeCoCMISDataCreator admin admin SomeCo whitepaper test

Here are some examples:

1- Suppose you want to create the file to Shared Files (Repository>Shared) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin Shared whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin Shared doc SomeCoTestDoc

2- Suppose you want to create the file under root of the repo (Repository) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin / whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin / doc SomeCoTestDoc

3- Suppose you want to create the file under a site's (here site name is 'swsdp' Sample: Web Site Design Project) document library (Repository>Sites>swsdp> documentLibrary) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin Sites/swsdp/documentLibrary whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin Sites/swsdp/documentLibrary doc SomeCoTestDoc

3- Suppose you want to create the file under a site's (here site name is 'test' Test) document library's Test folder (Repository> Sites> test> documentLibrary> Test) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin Sites/test/documentLibrary/Test whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin Sites/test/documentLibrary/Test doc SomeCoTestDoc

In all cases, success response should return the NodeId and Content length as logged here: https://github.com/jpotts/alfresco-developer-series/blob/master/content/content-tutorial-cmis/src/ma...

Example something like:

Created: 96fad9b6-981c-4304-91c1-1ecdb5477cd7;1.0
Content Length: 55
~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

2 Replies
abhinavmishra14
Advanced

Re: Creating Content with OpenCMIS

Jump to solution

The error is because, it is expected that the folder already exists. You need to create the folder and then try it. You can use a site based folder or repository as well. e.g. Repository > SomeCo

Repository is already represented as "/". Means its the root. 
 
java SomeCoCMISDataCreator admin admin SomeCo whitepaper test

Here are some examples:

1- Suppose you want to create the file to Shared Files (Repository>Shared) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin Shared whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin Shared doc SomeCoTestDoc

2- Suppose you want to create the file under root of the repo (Repository) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin / whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin / doc SomeCoTestDoc

3- Suppose you want to create the file under a site's (here site name is 'swsdp' Sample: Web Site Design Project) document library (Repository>Sites>swsdp> documentLibrary) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin Sites/swsdp/documentLibrary whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin Sites/swsdp/documentLibrary doc SomeCoTestDoc

3- Suppose you want to create the file under a site's (here site name is 'test' Test) document library's Test folder (Repository> Sites> test> documentLibrary> Test) , the command would be like:

 

java SomeCoCMISDataCreator <username> <password> <root folder> <doc|whitepaper> <content name>

Example for creating a whitepaper:
java SomeCoCMISDataCreator admin admin Sites/test/documentLibrary/Test whitepaper SomeCoTestWhitepaper

Example for creating a doc:
java SomeCoCMISDataCreator admin admin Sites/test/documentLibrary/Test doc SomeCoTestDoc

In all cases, success response should return the NodeId and Content length as logged here: https://github.com/jpotts/alfresco-developer-series/blob/master/content/content-tutorial-cmis/src/ma...

Example something like:

Created: 96fad9b6-981c-4304-91c1-1ecdb5477cd7;1.0
Content Length: 55
~Abhinav
(ACSCE, AWS SAA, Azure Admin)
YanFeiHu
Member II

Re: Creating Content with OpenCMIS

Jump to solution

Hi Abhinav;

    appreciate your help very much.

    Yes, I created the folder then it works.

     SomeCo1.png