Sun ONE Directory Server Resource Kit 5.2 Tools Reference |
Chapter 9
Directory Access Tools Using DSMLThe Sun ONE Directory Server Resource Kit (DSRK) includes tools that communicate with Sun ONE Directory Server using a Simple Object Access Protocol/Directory Services Markup Language (SOAP/DSML) interface. This chapter provides information on these tools. It contains the following sections:
OverviewThe LDAP tools using SOAP/DSML are located in the java/DSML directory. They include DsmlSearch and DsmlModify. They are similar to the ldapsearch and ldapmodify tools (defined in Chapter 3, "The ldapsearch Tool" and Chapter 4, "The ldapmodify Tool," respectively) except they use the SOAP/DSML interface to communicate with Directory Server. A README with information on these tools can also be found in the java/DSML directory.
Usage
The DSML tools are written in Java, therefore requiring a Java runtime environment to function properly. They were compiled using Java 1.3.1, and use Apache SOAP v2.3.1. In order to run properly, the tools need access to the following jar files:
Ensure that the listed jar files listed are in your CLASSPATH.
Tools
The tools included in the DSRK are:
They are explained in the following sections.
DsmlSearchThe DsmlSearch tool issues search requests to an LDAP directory and displays the result as XML text.
Syntax
The syntax of the DsmlSearch tool on the command-line takes the form:
java DsmlSearch -h http://host:port -b baseDN [options] filter [attributes...]
Where:
- host:port are the host name and port number of the directory server.
- baseDN defines the base distinguished name (DN) of the search.
- options are the command-line options and their parameters described in DsmlSearch Options.
- attributes define the attributes which are being searched.
DsmlSearch Options
Table 9-1 details the options available for the DsmlSearch tool.
DsmlModifyThe DsmlModify tool edits the contents of an LDAP directory, either by adding new entries or by modifying existing ones. The tool takes as input update statements in XML and issues the corresponding request to the designated directory server.
Syntax
The syntax of the DsmlModify tool on the command-line takes the form:
java DsmlModify -h http://host:port -b baseDN [options] -f Modfile
Where:
- host:port are the host name and port number of the directory server.
- baseDN defines the base DN for the entries to be modified.
- options are the command-line options and their parameters described in DsmlModify Options.
- Modfile is the path to the file that contains the entry modifications.
DsmlModify Options
Table 9-2 details the options available for the DsmlModify tool.
Java Naming and Directory InterfaceJava Naming and Directory Interface (JNDI) is an API specified in Java technology that provides naming and directory functionality to applications written in the Java programming language. The DSRK includes a JNDI service provider for DSML in the DSRK_base/jndi-dsml directory. More information can be found in Chapter 35, "Java Naming and Directory Interface."