3.3 WS-Enumeration 'Pull' Example
This example demonstrates a WS-Enumeration Pull operation [WSENUM] using a previously obtained enumeration context. Both the SOAP request message and the SOAP response message are shown. In the response message, two directory objects are returned. Both objects have the same parent directory object, as evidenced by the fact that both have the same value for their ad:container-hierarchy-parent synthetic attribute. In this example, the WS-Enumeration Enumerate operation that began the search requested three attributes to be returned: the LDAP directory attribute addata:givenName and the synthetic attributes ad:container-hierarchy-parent and ad:relativeDistinguishedName. The ad:objectReferenceProperty synthetic attribute is automatically included in the response by the server [MS-WSDS].
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: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"> <wsen:EnumerationContext> f52c7e9d-80c2-40cd-b8c9-55bc94fc3e47 </wsen:EnumerationContext> <wsen:MaxTime>PT10S</wsen:MaxTime> <wsen:MaxElements>2</wsen:MaxElements> </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> d22e957c-8278-4eb9-a57f-41574c55305d </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> </wsen:PullResponse> </soapenv:Body> </soapenv:Envelope>