4.1 Example of Creating an Identity Object
In this section, a new identity object is created using a Create operation with the IMDA protocol extensions. During the creation, identity attribute values are specified for five identity attributes. For one of the identity attributes (named by the identity attribute type "addata:otherTelephone"), two identity attribute values are specified. The dialect used for the identity attribute types is the XPath 1.0-derived dialect from [MS-ADDM] section 2.4. In the response, a wxf:ResourceCreated element is returned, the contents of which are used to target the IMDA operations against this newly created identity object in the subsequent examples.
SOAP Request Message
-
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <soapenv:Header> <wsa:Action soapenv:mustUnderstand="1"> http://schemas.xmlsoap.org/ws/2004/09/transfer/Create </wsa:Action> <IdentityManagementOperation soapenv:mustUnderstand="1" xmlns= "http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess" /> <instance xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory"> ldap:389 </instance> <wsa:MessageID> urn:uuid:b0936e92-ce04-4a1f-b557-bb85b02717b7 </wsa:MessageID> <wsa:ReplyTo> <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address> </wsa:ReplyTo> <wsa:To soapenv:mustUnderstand="1">net.tcp://server01.fabrikam.com:9389/ActiveDirectoryWebServices/Windows/ResourceFactory</wsa:To> </soapenv:Header> <soapenv:Body> <AddRequest Dialect="http://schemas.microsoft.com/2008/1/ActiveDirectory/Dialect/XPath-Level-1" xmlns="http://schemas.microsoft.com/2006/11/IdentityManagement/DirectoryAccess" xmlns:ad="http://schemas.microsoft.com/2008/1/ActiveDirectory" xmlns:addata="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <AttributeTypeAndValue> <AttributeType>addata:objectClass</AttributeType> <AttributeValue> <ad:value xsi:type="xsd:string">user</ad:value> </AttributeValue> </AttributeTypeAndValue> <AttributeTypeAndValue> <AttributeType>addata:description</AttributeType> <AttributeValue> <ad:value xsi:type="xsd:string">Sample description.</ad:value> </AttributeValue> </AttributeTypeAndValue> <AttributeTypeAndValue> <AttributeType>addata:otherTelephone</AttributeType> <AttributeValue> <ad:value xsi:type="xsd:string">(425) 555-0100</ad:value> <ad:value xsi:type="xsd:string">(206) 555-0100</ad:value> </AttributeValue> </AttributeTypeAndValue> <AttributeTypeAndValue> <AttributeType>ad:container-hierarchy-parent</AttributeType> <AttributeValue> <ad:value xsi:type="xsd:string"> CN=Users,DC=fabrikam,DC=com </ad:value> </AttributeValue> </AttributeTypeAndValue> <AttributeTypeAndValue> <AttributeType>ad:relativeDistinguishedName</AttributeType> <AttributeValue> <ad:value xsi:type="xsd:string">CN=Sample User</ad:value> </AttributeValue> </AttributeTypeAndValue> </AddRequest> </soapenv:Body> </soapenv:Envelope>
SOAP Response Message
-
<soapenv:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <soapenv:Header> <wsa:Action soapenv:mustUnderstand="1"> http://schemas.xmlsoap.org/ws/2004/09/transfer/CreateResponse </wsa:Action> <wsa:RelatesTo> urn:uuid:b0936e92-ce04-4a1f-b557-bb85b02717b7 </wsa:RelatesTo> <wsa:To soapenv:mustUnderstand="1"> http://www.w3.org/2005/08/addressing/anonymous </wsa:To> </soapenv:Header> <soapenv:Body> <wxf:ResourceCreated xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:ad="http://schemas.microsoft.com/2008/1/ActiveDirectory" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:Address>net.tcp://server01.fabrikam.com:9389/ActiveDirectoryWebServices/Windows/Resource</wsa:Address> <wsa:ReferenceParameters> <ad:objectReferenceProperty> 51419d0c-cadd-4b70-9c8d-8a73fdd2d32a </ad:objectReferenceProperty> <ad:instance>ldap:389</ad:instance> </wsa:ReferenceParameters> </wxf:ResourceCreated> </soapenv:Body> </soapenv:Envelope>