add warning(s) if a service type is defined from a class (it is better to define an interface)