Replaced deprecated 'setServer()' with 'setEndpoint()'.