use of org.jboss.as.webservices.webserviceref.WSRefAnnotationWrapper in project wildfly by wildfly.
the class WeldJaxwsInjectionServices method registerWebServiceRefInjectionPoint.
@Override
public <T> ResourceReferenceFactory<T> registerWebServiceRefInjectionPoint(final InjectionPoint injectionPoint) {
WebServiceRef annotation = getResourceAnnotated(injectionPoint).getAnnotation(WebServiceRef.class);
if (annotation == null) {
throw WeldLogger.ROOT_LOGGER.annotationNotFound(WebServiceRef.class, injectionPoint.getMember());
}
validateWebServiceRefInjectionPoint(injectionPoint, annotation);
try {
ManagedReferenceFactory factory = WebServiceReferences.createWebServiceFactory(deploymentUnit, classNameFromType(injectionPoint.getType()), new WSRefAnnotationWrapper(annotation), (AnnotatedElement) injectionPoint.getMember(), getBindingName(injectionPoint, annotation));
return new ManagedReferenceFactoryToResourceReferenceFactoryAdapter<>(factory);
} catch (DeploymentUnitProcessingException e) {
throw new RuntimeException(e);
}
}
Aggregations