List<OWS> services = serviceConfiguration.getByServiceType( service ); if ( services != null && !services.isEmpty() ) { if ( services.size() > 1 ) { if ( service != null && serviceConfiguration.getByServiceType( service ) == null ) { OWSException ex = new OWSException( "No service for service type '" + service + "' is configured / active.", "InvalidParameterValue", "service" );