cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble to create alfresco user CMIS

kameljahloug
Champ in-the-making
Champ in-the-making
Hi
I am working on a J2EE project, i am using CMIS to connect to alfresco, i want to know if there's any methode to create user
Thank you
10 REPLIES 10

romschn
Star Collaborator
Star Collaborator
AFAIK, You will have to use Alfresco REST API for creating a user as user/group cannot be created using CMIS.

You can take a look at the add user web script to create a new user. Here is the link to the documentation - http://docs.alfresco.com/5.0/references/RESTful-PersonPeoplePost.html

Here is the working example demonstrating the use of this web script for your reference - https://forums.alfresco.com/comment/146735#comment-146735

Hope this helps.

kameljahloug
Champ in-the-making
Champ in-the-making
Thank you Romschn for the answer
I already read this poste but didn't know the importe library that you use for this methode
Thank you

i did not get when you mentioned - "I already read this poste but didn't know the iporte that you use for this methode ". Could you please help me understand that.

kameljahloug
Champ in-the-making
Champ in-the-making
I need more informations about the differentes libraries that you use for making this methode work
Thank you

In the example, I used gson-*.jar which basically was used to convert JAVA POJO to json string in order to pass it to the REST API.

Hope this helps.

kameljahloug
Champ in-the-making
Champ in-the-making
After searching i did'nt find  where to download  the library uploader.InteractiveAuthentication;

That was used in that example. Another simpler way would be as following. You can simply make a POST/GET call to the ticket web script url, it will return following kind of output

<ticket>TICKET_4695644e2618f55848e8a6a1e9e24e431651c309</ticket>


You need to parse it and get the value inside <ticket></ticket> in order to further use it. You can simply do this by matching pattern to the web script output.

Hope this helps.

kameljahloug
Champ in-the-making
Champ in-the-making
Thank you Romschn it's work fine

romschn
Star Collaborator
Star Collaborator
Here is a working example of creating a new user using REST API for your reference - https://forums.alfresco.com/comment/146735#comment-146735

Hope this helps.