private static QName getServiceName ( Server server ) { QName serviceName ; String bindingId = getBindingId ( server ) ; EndpointInfo eInfo = server . getEndpoint ( ) . getEndpointInfo ( ) ; if ( JAXRS_BINDING_ID . equals ( bindingId ) ) { serviceName = eInfo . getName ( ) ; } else { ServiceInfo serviceInfo = eInfo . getService ( ) ; serviceName = serviceInfo . getName ( ) ; } return serviceName ; }
Extracts the service name from a Server .