The URl to the server should be taken from client.getBaseUrl();