Example 13–5 shows a DSML base object search request on the root DSE entry.
POST /dsml HTTP/1.1
HOST: hostname
Content-Length: 1081
Content-Type: text/xml
SOAPAction: ""
Connection: close
<?xml version=’1.0’ encoding=’UTF-8’?\>
<soap-env:Envelope
xmlns:xsd=’http://www.w3.org/2001/XMLSchema’
xmlns:xsi=’http://www.w3.org/2001/XMLSchema-instance’
xmlns:soap-env=’http://schemas.xmlsoap.org/soap/envelope/’
\>
<soap-env:Body\>
<batchRequest
xmlns=’urn:oasis:names:tc:DSML:2:0:core’
requestID=’Batch of search requests’
\>
<searchRequest
dn=""
requestID="search on Root DSE"
scope="baseObject"
derefAliases="neverDerefAliases"
typesOnly="false"
\>
<filter\>
<present name="objectClass"/\>
</filter\>
<attributes\>
<attribute name="namingContexts"/\>
<attribute name="supportedLDAPversion"/\>
<attribute name="vendorName"/\>
<attribute name="vendorVersion"/\>
<attribute name="supportedSASLMechanisms"/\>
</attributes\>
</searchRequest\>
</batchRequest\>
</soap-env:Body\>
</soap-env:Envelope\>
dn=""requestID="search on Root DSE"specifies that the search operation requests data under the root DSE entry (empty DN) and is identified with an optional request ID attribute.
scope="baseObject"specifies that the search is a base object search.
derefAliases="neverDerefAliases"specifies that the aliases should not be dereferenced while searching or locating the base object of the search. This is the only derefAliases value supported by Directory Server.
typesOnly="false"specifies that both the attribute names and their values be returned. typesOnly="true" would return attribute names only. The default value for this attribute is false.
For the entry to match the filter, the presence of objectclass filter is used as follows.
<filter\> <present name="objectClass"/\> </filter\>
This is equivalent to the LDAP filter string (objectclass=*). The filter is followed by the list of desired attributes.
<attributes\> <attribute name="namingContexts"/\> <attribute name="supportedLDAPversion"/\> <attribute name="vendorName"/\> <attribute name="vendorVersion"/\> <attribute name="supportedSASLMechanisms"/\> </attributes\>
HTTP/1.1 200 OK
Cache-control: no-cache
Connection: close
Date: Fri, 15 Dec 2006 09:21:43 GMT
Accept-Ranges: none
Server: Directory Server Enterprise Edition/11g Release 1 (11.1.1)
Content-Type: text/xml; charset="utf-8"
Content-Length: 1287
<?xml version=’1.0’ encoding=’UTF-8’ ?\>
<soap-env:Envelope
xmlns:xsd=’http://www.w3.org/2001/XMLSchema’
xmlns:xsi=’http://www.w3.org/2001/XMLSchema-instance’
xmlns:soap-env=’http://schemas.xmlsoap.org/soap/envelope/’
\>
<soap-env:Body\>
<batchResponse
xmlns:xsd=’http://www.w3.org/2001/XMLSchema’
xmlns:xsi=’http://www.w3.org/2001/XMLSchema-instance’
xmlns=’urn:oasis:names:tc:DSML:2:0:core’
requestID=’Batch of search requests’
\>
<searchResponse requestID=’search on Root DSE’\>
<searchResultEntry\>
<attr name=’namingContexts’\>
<value\>dc=example,dc=com</value\>
</attr\>
<attr name=’supportedLDAPVersion’\>
<value\>2</value\>
<value\>3</value\>
</attr\>
<attr name=’vendorName’\>
<value\>Sun Microsystems, Inc.</value\>
</attr\>
<attr name=’vendorVersion’\>
<value\>Directory Server Enterprise Edition/11g Release 1 (11.1.1)</value\>
</attr\>
<attr name=’supportedSASLMechanisms’\>
<value\>EXTERNAL</value\>
<value\>GSSAPI</value\>
<value\>DIGEST-MD5</value\>
</attr\>
</searchResultEntry\>
<searchResultDone\>
<resultCode code=’0’ descr=’success’/\>
</searchResultDone\>
</searchResponse\>
</batchResponse\>
</soap-env:Body\>
</soap-env:Envelope\>