implementation of task c

solved issue with NamingContext
still getting no response from server or callback method is not fired
properly.