4.4 WS-Transfer LDAP v3 Controls Extensions Pull Example

In this example, the directory object is retrieved using a [WSENUM] Pull operation in the context of an Enumeration specifying the search of the directory object in previous examples. During the extraction, both the LDAP show deleted control (LDAP_SERVER_SHOW_DELETED_OID) ([MS-ADTS] section 3.1.1.3.4.1.14) and the LDAP statistical control (LDAP_SERVER_GET_STATS_OID) ([MS-ADTS] section 3.1.1.3.4.1.6) are added to the request. The response to this control could be seen in the response message.

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/enumeration/Pull</wsa:Action>
     <wsa:MessageID>
         urn:uuid:b22747a9-ca15-41de-8c91-5a51bd88669c
     </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/Enumeration
     </wsa:To>
   </soapenv:Header>
   <soapenv:Body>
     <wsen:Pull xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/
 enumeration"
                xmlns:ad="http://schemas.microsoft.com/2008/1/
 ActiveDirectory">
       <wsen:EnumerationContext>
 cda3e08b-cec1-42bb-8245-7cb6235a24b8</wsen:EnumerationContext>
       <wsen:MaxTime>PT10S</wsen:MaxTime>
       <wsen:MaxElements>1</wsen:MaxElements>
       <ad:controls>
         <ad:control type="1.2.840.113556.1.4.970" 
 criticality="true" />
         <ad:control type="1.2.840.113556.1.4.417" 
 criticality="false" />
       </ad:controls>
     </wsen:Pull>
   </soapenv:Body>
 </soapenv:Envelope>
  

SOAP Response 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/enumeration/
 PullResponse
     </wsa:Action>
     <wsa:RelatesTo>urn:uuid:b22747a9-ca15-41de-8c91-5a51bd88669c
 </wsa:RelatesTo>
     <wsa:To soapenv:mustUnderstand="1">
       http://www.w3.org/2005/08/addressing/anonymous
     </wsa:To>
   </soapenv:Header>
   <soapenv:Body>
     <wsen:PullResponse
         xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/
 enumeration"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:ad="http://schemas.microsoft.com/2008/1/
 ActiveDirectory"
        xmlns:addata="http://schemas.microsoft.com/2008/1/
 ActiveDirectory/Data">
       <wsen:EnumerationContext>
         cda3e08b-cec1-42bb-8245-7cb6235a24b8
       </wsen:EnumerationContext>
       <wsen:Items>
         <addata:user>
           <ad:objectReferenceProperty>
             <ad:value xsi:type="xsd:string">
               373e1409-cf88-41dc-b8ea-bdd27d54e073
             </ad:value>
           </ad:objectReferenceProperty>
           <ad:container-hierarchy-parent>
             <ad:value xsi:type="xsd:string">
               41816238-95ca-48d9-9a99-3bd9ae9e0e42
             </ad:value>
           </ad:container-hierarchy-parent>
           <ad:relativeDistinguishedName>
             <ad:value xsi:type="xsd:string">CN=TestUser1
 </ad:value>
           </ad:relativeDistinguishedName>
           <addata:givenName LdapSyntax="UnicodeString">
             <ad:value xsi:type="xsd:string">John</ad:value>
           </addata:givenName>
         </addata:user>
         <addata:user>
           <ad:objectReferenceProperty>
             <ad:value xsi:type="xsd:string">
               51d67624-d52d-421d-a0d6-1dc350abd009
             </ad:value>
           </ad:objectReferenceProperty>
           <ad:container-hierarchy-parent>
             <ad:value xsi:type="xsd:string">
               41816238-95ca-48d9-9a99-3bd9ae9e0e42
             </ad:value>
           </ad:container-hierarchy-parent>
           <ad:relativeDistinguishedName>
             <ad:value xsi:type="xsd:string">CN=TestUser2
 </ad:value>
           </ad:relativeDistinguishedName>
           <addata:givenName LdapSyntax="UnicodeString">
             <ad:value xsi:type="xsd:string">Robert
 </ad:value>
           </addata:givenName>
         </addata:user>
       </wsen:Items>
       <ad:controls>
         <ad:control type="1.2.840.113556.1.4.970" 
 criticality="false">
           <ad:controlValue xsi:type="xsd:base64Binary">
 MIQAAAB2AgEBAgEBAgEDAgEgAgEFAgECAgEGAgEFAgEHBBUgKG9iamVjdENsYXN
 zPXVzZXIpIAACAQgEFVRFTVBPUkFSWV9TT1JUX0lOREVYAAIBCQIBXQIBCgIBBQ
 IBCwIBAAIBDAIBAgIBDQIBBQIBDgIBAAIBDwIBAA==</ad:controlValue>
         </ad:control>         
       </ad:controls>
     </wsen:PullResponse>
   </soapenv:Body>
 </soapenv:Envelope>