text: I am doing a lab setup with AD ,CUCM and IM&P.
  Version are as follows:
  IM & P : 126.96.36.19900-4
  I have created the service profile with UDS as per the screenshot.
  But in the client health checkup i can see that the Directory is disconnected.
  and because of this I am not able to search any contacts.
  This is a on-premises deployment solution .
  Any help is appreciated.
  Also which logs shall i look for to find the cause in this case.
  could you please confirm how are you trying to login into jabber? is it manual or automatic. as per your issue description ,i believe you are logging into jabber manually. once you confirm this , i shall tell you the next step for resolving this.
  i suggest you to configure DNS SRV record if you want " use UDS for contact resolution" to work. Jabber should know what are the UDS server so that it can contact them for directory. refer the below for configuring DNS SRV records