Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun ONE Directory Server Resource Kit 5.2 Tools Reference 

Chapter 9
Directory Access Tools Using DSML

The 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:


Overview

The 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.


Note

Directory Services Markup Language (DSML) is a markup language that enables you to represent directory entries and commands in XML. Simple Object Access Protocol (SOAP) is an XML-based protocol used for the exchange of information. Using these two standards directory information can be sent using the HyperText Transfer Protocol (HTTP).


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.


DsmlSearch

The 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:

DsmlSearch Options

Table 9-1 details the options available for the DsmlSearch tool.

Table 9-1  Command-line Options for DsmlSearch 

Option

Parameter

Purpose

-h

hostURL

Specifies the URL of the directory server.

-b

baseDN

Specifies the base DN of the search.

-D

bindDN

Specifies the bind DN.

-w

passwd

Specifies the bind password (for simple HTTP authentication).

-s

1.  scope

2.  baseObject

3.  singleLevel

4.  wholeSubtree

1.  Specifies the scope of the search.

2.  For searching only the base entry.

3.  For searching only the children.

4.  For searching the base entry and all children.

-a

1.  deref

2.  neverDefAliases

3.  derefFindingBaseObj

4.  derefAlways

1.  Specifies how aliases are dereferenced.

2.  Aliases are never dereferenced.

3.  Dereferenced when finding the base DN.

4.  Dereferenced when finding below the base DN.

-l

seconds

Specifies the maximum number of seconds to wait for the search.

-z

number

Specifies the maximum number of entries to return for the search

-f

file

Specifies the name of the file containing the search filter


DsmlModify

The 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:

DsmlModify Options

Table 9-2 details the options available for the DsmlModify tool.

Table 9-2  Command-line Options for DsmlModify

Option

Parameter

Purpose

-h

hostURL

Specifies the URL of the directory server.

-b

baseDN

Specifies base dn to search.

-D

bindDN

Specifies the bind dn.

-w

passwd

Specifies the bind password (for simple HTTP authentication).

-f

Modfile

Specifies the name of a text file that includes the modifications


Java Naming and Directory Interface

Java 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."



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.