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);
}
}