public void configure(EndpointDescription endpointDescription) { if(log.isDebugEnabled()){ log.debug("Start ServerFramework.conigure(EndpointDescription)"); } for (Annotation annotation : getAllAnnotations()) { WebServiceFeatureAnnotation wsfAnnotation = getWebServiceFeatureAnnotation(annotation); ServerConfigurator configurator = configuratorMap.get(wsfAnnotation.id()); if (log.isDebugEnabled()) { log.debug("Found ServerConfigurator: " + configurator.getClass().getName()); } if (log.isDebugEnabled()) { log.debug("Starting " + configurator.getClass().getName() + ".configure()"); } configurator.configure(endpointDescription); if (log.isDebugEnabled()) { log.debug("Completed " + configurator.getClass().getName() + ".configure()"); } } if(log.isDebugEnabled()){ log.debug("Exit ServerFramework.conigure(EndpointDescription)"); } }
public boolean isValid(Annotation annotation) { if (annotation == null) return false; WebServiceFeatureAnnotation wsfAnnotation = getWebServiceFeatureAnnotation(annotation); String id = null; if (wsfAnnotation != null) id = wsfAnnotation.id(); return configuratorMap.containsKey(id); }
public void addAnnotation(Annotation annotation) { if (!isValid(annotation)) { throw ExceptionFactory. makeWebServiceException(Messages.getMessage("invalidWSAnnotation", annotation.toString())); } WebServiceFeatureAnnotation wsfAnnotation = getWebServiceFeatureAnnotation(annotation); annotationMap.put(wsfAnnotation.id(), annotation); }
/** * Finds the list of WebServiceFeatureAnnotation instances, and set them on the composite. * * @param composite */ private void attachWebServiceFeatureAnnotations(DescriptionBuilderComposite composite) { List<Annotation> features = ConverterUtils.getAnnotations( WebServiceFeatureAnnotation.class, serviceClass); if (features.size() > 0) { if (log.isDebugEnabled()) { log.debug("There were [" + features.size() + "] WebServiceFeature annotations found."); } composite.setWebServiceFeatures(features); } }
private WebServiceFeatureAnnotation getWebServiceFeatureAnnotation(Annotation annotation) { if (log.isDebugEnabled()) { log.debug("Looking up WebServiceFeature annotation for " + annotation.annotationType()); } return annotation.annotationType().getAnnotation(WebServiceFeatureAnnotation.class); }
private WebServiceFeatureAnnotation getFeatureFromAnnotation(Annotation a) { return a.annotationType().getAnnotation(WebServiceFeatureAnnotation.class); }