public List<ServiceEndpoint> getEndpoints(Service service, String protocol) throws DaoException {
   List<ServiceEndpoint> eps = new ArrayList<ServiceEndpoint>();
   for (ServiceEndpoint e : service.getServiceEndpoints()) {
     String p = e.getProtocolId();
     if (p != null) {
       if (e.getProtocolId().equals(protocol)) {
         eps.add(e);
       }
     } else {
       if (protocol.equals(Protocols.DEFAULT)) {
         eps.add(e);
       }
     }
   }
   return eps;
 }