directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wim V" <...@pizzastop.be>
Subject RE: [ApacheDS] integration test with custom schema elements (using CiRunner)
Date Wed, 21 May 2008 12:07:57 GMT
Hi,

You can use J2SE 5 javax.naming to do this :
http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/ldap/InitialLdapContext
.html

To manage users and groups afterwards, if you like, you can also use a
higher lever api like f.e. WSO2 User Manager :
http://wso2.org/projects/commons/user-manager

Hope this helps,

Wim Verreycken


-----Original Message-----
From: Rob van der Linden Vooren [mailto:robvdlv@gmail.com] 
Sent: woensdag 21 mei 2008 9:31
To: users@directory.apache.org
Subject: [ApacheDS] integration test with custom schema elements (using
CiRunner)

Hi all,

We're trying to run a LDAP integration test, using ApacheDS 1.5.2.
Some of the attributes required by the LDAP entry we are trying to
create in the LDAP server, are part of the apple LDAP schema; If I
understood correctly, we need:

1. a way to either import the apple ldap schema or
2. to add custom elements to our schema.
so that in our entries we can use and the attributes from the proper
objectclasses (apple-user).

Having done some research on how to achieve option 1, I understand
that to support an apple schema, we will have to programmatically set
this up, which seems like quite some work to do; We have not found a
simple way -although I have seen mentioning of a schema import- to
achieve this.

Thus, deciding to go for option 2, we also looked at:
http://directory.apache.org/apacheds/1.5/add-your-first-elements-to-the-sche
ma.html
Using the setup described in:
http://directory.apache.org/apacheds/1.5/core-integration-testing-framework.
html
we are using the testrunner to startup our test.

There is a sample of adding custom attributes and objectclass, which
we think we can use to get our unit test running.
My question is, how do we get hold of the:

DirContext ctx = new InitialDirContext();
DirContext schema = ctx.getSchema("");

that is mentioned? from within our test? I don't see how to get a
reference any of this since we only have the DirectoryService
reference..

Is there something we overlook?

Thanks in advance.


Mime
View raw message