Extract classes which can be shared between client and server of service into a shared library.