3.1 WS-Transfer 'Get' Example
The following example shows a WS-Transfer Get [WXFR] operation. Both the SOAP request message and the SOAP response message are shown. This example retrieves the complete XML view of a directory object. In this example, the most specific structural object class of the directory object is user. The object has an LDAP distinguished name of "CN=TestUser1,DC=fabrikam,DC=com". The GUID for its object reference property is {1e0f3427-bbcb-474d-a532-a2ba6168c4dc}, and its parent object has a object reference property whose GUID is {e4f8a504-d7df-4b63-a636-5642d3bf1cf6}.
SOAP request message:
-
<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Header> <wsa:Action soapenv:mustUnderstand="1"> http://schemas.xmlsoap.org/ws/2004/09/transfer/Get </wsa:Action> <objectReferenceProperty xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory"> 1e0f3427-bbcb-474d-a532-a2ba6168c4dc </objectReferenceProperty> <instance xmlns="http://schemas.microsoft.com/2008/1/ActiveDirectory"> ldap:389 </instance> <wsa:MessageID> urn:uuid:720f1d9c-5181-42c8-91ab-3deef105d0ff </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/Resource </wsa:To> </soapenv:Header> <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/transfer/GetResponse </wsa:Action> <wsa:RelatesTo> urn:uuid:720f1d9c-5181-42c8-91ab-3deef105d0ff </wsa:RelatesTo> <wsa:To soapenv:mustUnderstand="1"> http://www.w3.org/2005/08/addressing/anonymous </wsa:To> </soapenv:Header> <soapenv:Body> <addata:user xmlns:addata="http://schemas.microsoft.com/2008/1/ActiveDirectory/Data" xmlns:ad="http://schemas.microsoft.com/2008/1/ActiveDirectory" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ad:objectReferenceProperty> <ad:value xsi:type="xsd:string"> 1e0f3427-bbcb-474d-a532-a2ba6168c4dc </ad:value> </ad:objectReferenceProperty> <addata:lastLogon LdapSyntax="LargeInteger"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:lastLogon> <addata:dSCorePropagationData LdapSyntax="GeneralizedTimeString"> <ad:value xsi:type="xsd:string">16010101000000.0Z</ad:value> </addata:dSCorePropagationData> <addata:objectSid LdapSyntax="SidString"> <ad:value xsi:type="xsd:base64Binary"> AQUAAAAAAAUVAAAAbTIi8R3L2V3ypAE4plMAAA== </ad:value> </addata:objectSid> <addata:whenCreated LdapSyntax="GeneralizedTimeString"> <ad:value xsi:type="xsd:string">20080722202149.0Z</ad:value> </addata:whenCreated> <addata:badPasswordTime LdapSyntax="LargeInteger"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:badPasswordTime> <addata:accountExpires LdapSyntax="LargeInteger"> <ad:value xsi:type="xsd:string">9223372036854775807</ad:value> </addata:accountExpires> <addata:name LdapSyntax="UnicodeString"> <ad:value xsi:type="xsd:string">TestUser1</ad:value> </addata:name> <addata:uSNChanged LdapSyntax="LargeInteger"> <ad:value xsi:type="xsd:string">166235</ad:value> </addata:uSNChanged> <addata:objectCategory LdapSyntax="DSDNString"> <ad:value xsi:type="xsd:string"> CN=Person,CN=Schema,CN=Configuration,DC=Fabrikam,DC=com </ad:value> </addata:objectCategory> <addata:sAMAccountType LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">805306368</ad:value> </addata:sAMAccountType> <addata:codePage LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:codePage> <addata:instanceType LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">4</ad:value> </addata:instanceType> <addata:countryCode LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:countryCode> <addata:distinguishedName LdapSyntax="DSDNString"> <ad:value xsi:type="xsd:string"> CN=TestUser1,DC=Fabrikam,DC=com </ad:value> </addata:distinguishedName> <addata:cn LdapSyntax="UnicodeString"> <ad:value xsi:type="xsd:string">TestUser1</ad:value> </addata:cn> <addata:objectClass LdapSyntax="ObjectIdentifier"> <ad:value xsi:type="xsd:string">top</ad:value> <ad:value xsi:type="xsd:string">person</ad:value> <ad:value xsi:type="xsd:string">organizationalPerson</ad:value> <ad:value xsi:type="xsd:string">user</ad:value> </addata:objectClass> <addata:logonCount LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:logonCount> <addata:uSNCreated LdapSyntax="LargeInteger"> <ad:value xsi:type="xsd:string">166234</ad:value> </addata:uSNCreated> <addata:userAccountControl LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">546</ad:value> </addata:userAccountControl> <addata:objectGUID LdapSyntax="OctetString"> <ad:value xsi:type="xsd:base64Binary"> JzQPHsu7TUelMqK6YWjE3A== </ad:value> </addata:objectGUID> <addata:primaryGroupID LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">513</ad:value> </addata:primaryGroupID> <addata:lastLogoff LdapSyntax="LargeInteger"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:lastLogoff> <addata:sAMAccountName LdapSyntax="UnicodeString"> <ad:value xsi:type="xsd:string">testusr1</ad:value> </addata:sAMAccountName> <addata:badPwdCount LdapSyntax="Integer"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:badPwdCount> <addata:whenChanged LdapSyntax="GeneralizedTimeString"> <ad:value xsi:type="xsd:string">20080722202149.0Z</ad:value> </addata:whenChanged> <addata:pwdLastSet LdapSyntax="LargeInteger"> <ad:value xsi:type="xsd:string">0</ad:value> </addata:pwdLastSet> <ad:container-hierarchy-parent> <ad:value xsi:type="xsd:string"> e4f8a504-d7df-4b63-a636-5642d3bf1cf6 </ad:value> </ad:container-hierarchy-parent> <ad:relativeDistinguishedName> <ad:value xsi:type="xsd:string">CN=TestUser1</ad:value> </ad:relativeDistinguishedName> <ad:distinguishedName> <ad:value xsi:type="xsd:string"> CN=TestUser1,DC=Fabrikam,DC=com </ad:value> </ad:distinguishedName> </addata:user> </soapenv:Body> </soapenv:Envelope>