7.6.3.2 Getting an LDAP Response from a Directory Server
This event occurs when the client receives an LDAPMessage from a directory server.
The parameters for this task are as follows:
Name |
Type |
Description |
Optional |
---|---|---|---|
TaskInputLdapResultMessage |
LDAPMessage |
The LDAPMessage received from the directory server. |
No |
This task does not return any results.
The task performs the following actions:
Let originalRequest be the LDAPRequest instance for which originalRequest.requestMessage.messageID is equal to TaskInputLdapResultMessage.messageID. If there is no such match because of a timeout (see section 7.6.4.1), the task ends.
Let containingConnectionInfo be the ConnectionInfo instance for which containingConnectionInfo.pendingRequestList contains originalRequest.
Let containingADConnection be the ADConnection instance contained in ADCList for which containingADConnection.primaryConnection is set to containingConnectionInfo or for which the containingADConnection.referralConnections list contains containingConnectionInfo. Because there is a unique networkConnection, and therefore a TCP connection, associated with each ADConnection, there will be only one ADConnection that matches the criteria in this step.
If TaskInputLdapResultMessage.protocolOp is an LDAPResult and TaskInputLdapResultMessage.protocolOp.resultCode is referral ([RFC2251] section 4.1.10 in the case of LDAP v3) or is the value 9 (section 3.1.1.3.1.4, Referrals in LDAPv2 and LDAPv3, in the case of LDAP v2) and containingADConnection.LDAP_OPT_REFERRALS is "ON" or "LDAP_CHASE_REFERRALS":
Let urlList be a list of LDAP URLs ([RFC2255]) contained in TaskInputLdapResultMessage.protocolOp.referral ([RFC2251] section 4.1.10, Result Message, in the case of LDAP v3) or in TaskInputLdapResultMessage.protocolOp.errorMessage (section 3.1.1.3.1.4, Referrals in LDAPv2 and LDAPv3, in the case of LDAP v2).
For each ldapUrl in urlList:
Invoke the task Following an LDAP Referral or Continuation Reference (section 7.6.2.6) with the following parameters: TaskInputLdapRequest is set to originalRequest and TaskInputReferralUrl is set to ldapUrl. If this invocation returns TRUE, this task returns.
If TaskInputLdapResultMessage.protocolOp is a SearchResultReference and containingADConnection.LDAP_OPT_REFERRALS is "ON" or "LDAP_CHASE_CONTINUATION_REFERENCES":
Let urlList be a list of LDAP URLs ([RFC2255]) contained in TaskInputLdapResultMessage.protocolOp.
For each ldapUrl in urlList:
Invoke the task Following an LDAP Referral or Continuation Reference (section 7.6.2.6) with the following parameters: TaskInputLdapRequest is set to originalRequest and TaskInputReferralUrl is set to ldapUrl. If this invocation returns TRUE, this task returns.
Append TaskInputLdapResultMessage to originalRequest.resultMessages.
At this point there is either an LDAPResult or the next search response. If TaskInputLdapResultMessage.protocolOp is an LDAPResult, then originalRequest is removed from containingConnectionInfo.pendingRequestList and any tasks waiting on results for originalRequest proceed. Otherwise these tasks continue to wait for additional responses.