working sample client->server->endpoint and back