Expand my Community achievements bar.

Adding a user using web services

Avatar

Level 2

Is it possible to add a user using web services? I am trying to do this using .net but I am getting errors. I was able to search and delete users!

7 Replies

Avatar

Former Community Member

The users are controlled through the synchronization with an LDAP source. You should be adding the users through that means and doing a synch with that LDAP source.

Paul

Avatar

Level 2

What if I don't have LDAP? I was able to search and delete a user with regular web services using .net and C#!

Avatar

Level 10

You can use the java api to add local users to LiveCycle.

If that code is in a servlet, you can use a HTTP post from .Net to invoke it.

If you create a custom component and deploy it as a service in LiveCycle, you'll be able to invoke it as a web service.

Jasmin

Avatar

Level 2

I will look into this. The only thing is, I was able to update, remove and search users using web services in .net, but I don't understand why can't I add a user using the same web service? The method of creating a local user is available in the web service! I even tried adding a user and I get the following error:

org.xml.sax.SAXException: Unable to create JavaBean of type com.adobe.idp.um.api.infomodel.User.  Missing default constructor?  Error was: java.lang.InstantiationException: com.adobe.idp.um.api.infomodel.User.

doesn't this mean it is trying to create a user?

web service:

https://DomainName/soap/services/DirectoryManagerService?wsdl

Web service function:

public stringcreateLocalUser(UserlocalUser, string password);

<xsd:element name="createLocalUser">

<xsd:complexType>

<xsd:sequence>

<xsd:element minOccurs="0" maxOccurs="1" name="localUser" type="impl:User" />

<xsd:element minOccurs="0" maxOccurs="1" name="password" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

Avatar

Level 2

Any one reading this I have worked on it and it is possible:

The main things you will need are the following:

1. Create the web service reference:

http[s]://LiveCycleDomainName/soap/services/DirectoryManagerService?wsdl

2. Set credentials to log in to the Live Cycle

DirectoryManagerServiceService DirectoryManager = new DirectoryManagerServiceService();

DirectoryManager.Credentials = new System.Net.NetworkCredential("LiveCycleUser","LiveCyclePassword");

3. Create an instance of the class of UserImpl newUser = new UserImpl();

4. You will need to give the following data:

newUser.canonicalName = " UserName";

newUser.userid = "UserName";

newUser.domainName = "DomainName";

newUser.principalType = "USER";

newUser.local = true;

newUser.locked = false;

newUser.system = false;

newUser.disabled = false;

5. Now call string NewUserID = DirectoryManager.createLocalUser(newUser, "12345678")

6. You should have now a new user in Live Cycle Rights Managment

I hope this helps you. This was written in C# and .net, but I am sure you can use this in any language J

Have a great day

Avatar

Level 2

I was able to solve the problem

Avatar

Level 2

Does anyone know if there is a way to do this via straight HTTP request, versus via Java or some other programming language. Like, is there a way to specify the UserImpl in the SOAP Envelope? Thanks.