void setServletName(Set webComponentDescriptors) { Iterator it = webComponentDescriptors.iterator(); String endpointName = null; while (it.hasNext()) { WebComponentDescriptor desc = (WebComponentDescriptor) it.next(); String name = desc.getCanonicalName(); if (JAXWS_SERVLET.equals(desc.getWebComponentImplementation())) { endpointName = name; } if (desc.getSecurityRoleReferences().hasMoreElements()) { servletName = name; break; } } if (servletName == null) { servletName = endpointName; } }