Directory Services

Moving a Directory Object

The following code example moves the Consulting organizational unit down one level to the Sales organizational unit in the LDAP directory.

<se:Envelope xmlns:se="">
   <se:Body xmlns="urn:oasis:names:tc:DSML:2:0:core">
	<batchRequest xmlns="urn:oasis:names:tc:DSML:2:0:core" xmlns:xsd="">
		 <modDNRequest dn="ou=Consulting,ou=DSMLTesting,dc=fabrikam,dc=com" 
					 newrdn="ou=Consulting" newSuperior="ou=Sales,ou=DSMLTesting,dc=fabrikam,dc=com"/>

The <se:Envelope> and <se:Body> SOAP elements enclose the DSML payload. The first element of the DSML payload, <batchRequest>, is the mandatory top-level element for all DSML V2 requests. The <modDNRequest> element moves the existing Consulting organizational unit below the Sales organizational unit in the directory.

For more information, see Transmitting and Receiving SOAP-DSML Messages.