Search in sources :

Example 1 with WSRefAnnotationWrapper

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);
    }
}
Also used : DeploymentUnitProcessingException(org.jboss.as.server.deployment.DeploymentUnitProcessingException) WSRefAnnotationWrapper(org.jboss.as.webservices.webserviceref.WSRefAnnotationWrapper) ManagedReferenceFactory(org.jboss.as.naming.ManagedReferenceFactory) WebServiceRef(javax.xml.ws.WebServiceRef)

Aggregations

WebServiceRef (javax.xml.ws.WebServiceRef)1 ManagedReferenceFactory (org.jboss.as.naming.ManagedReferenceFactory)1 DeploymentUnitProcessingException (org.jboss.as.server.deployment.DeploymentUnitProcessingException)1 WSRefAnnotationWrapper (org.jboss.as.webservices.webserviceref.WSRefAnnotationWrapper)1