The problem is that you are binding a Server
object into the Name Service within your server code, but then your client code tries to narrow that to a Client
type. Those types are incompatible.
Change your client code to do this instead:
Server s = ServerHelper.narrow(obj);
You don't need two separate IDL interfaces for client and server. Just create one that the server implements, and have the client call it.