Directory Services

Adding a Directory Object

The following code example adds an organizationalUnit object named DSMLSamples to 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"
			<addRequest dn="ou=DSMLSamples,dc=fabrikam,dc=com”>
				<attr name="objectClass">

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 <addRequest> element creates the new object with a distinguished name of ou=DSMLSamples,dc=fabrikam,dc=com, with an attribute named objectClass that is set to a value of organizationalUnit.

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