Make getServiceName public

I used to get service name from getResourcePath but now it's deprecated and this method is by some reason not public.