use of javax.xml.ws.WebServiceRefs in project wildfly by wildfly.
the class WSRefUtils method getWebServiceRefAnnotation.
private static WebServiceRef getWebServiceRefAnnotation(final AnnotatedElement anElement, final UnifiedServiceRefMetaData serviceRefUMDM) {
final WebServiceRef webServiceRefAnnotation = getAnnotation(anElement, WebServiceRef.class);
final WebServiceRefs webServiceRefsAnnotation = getAnnotation(anElement, WebServiceRefs.class);
if (webServiceRefAnnotation == null && webServiceRefsAnnotation == null) {
return null;
}
// Build the list of @WebServiceRef relevant annotations
final List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
if (webServiceRefAnnotation != null) {
wsrefList.add(webServiceRefAnnotation);
}
if (webServiceRefsAnnotation != null) {
for (final WebServiceRef webServiceRefAnn : webServiceRefsAnnotation.value()) {
wsrefList.add(webServiceRefAnn);
}
}
// Return effective @WebServiceRef annotation
WebServiceRef returnValue = null;
if (wsrefList.size() == 1) {
returnValue = wsrefList.get(0);
} else {
for (WebServiceRef webServiceRefAnn : wsrefList) {
if (serviceRefUMDM.getServiceRefName().endsWith(webServiceRefAnn.name())) {
returnValue = webServiceRefAnn;
break;
}
}
}
return returnValue;
}
use of javax.xml.ws.WebServiceRefs in project Payara by payara.
the class WebServiceRefsHandler method processAnnotation.
public HandlerProcessingResult processAnnotation(AnnotationInfo ainfo) throws AnnotationProcessorException {
WebServiceRefs wsRefsAnnotation = (WebServiceRefs) ainfo.getAnnotation();
WebServiceRef[] wsRefAnnotations = wsRefsAnnotation.value();
List<HandlerProcessingResult> results = new ArrayList<HandlerProcessingResult>();
for (WebServiceRef wsRef : wsRefAnnotations) {
results.add(processAWsRef(ainfo, wsRef));
}
HandlerProcessingResult finalResult = null;
for (HandlerProcessingResult result : results) {
if (finalResult == null || (result.getOverallResult().compareTo(finalResult.getOverallResult()) > 0)) {
finalResult = result;
}
}
return finalResult;
}
Aggregations