Examples of WSEndpointHandlersMapping


Examples of org.jboss.as.webservices.injection.WSEndpointHandlersMapping

        super(HANDLER_CHAIN_ANNOTATION);
    }

    @Override
    protected void processAnnotation(final DeploymentUnit unit, final ClassInfo classInfo, final AnnotationInstance wsAnnotation, final CompositeIndex compositeIndex) throws DeploymentUnitProcessingException {
        final WSEndpointHandlersMapping mapping = getRequiredAttachment(unit, WS_ENDPOINT_HANDLERS_MAPPING_KEY);
        final String endpointClassName = classInfo.name().toString();

        if (isEjb3(classInfo)) {
            for (final EJBEndpoint ejbEndpoint : getJaxwsEjbs(unit)) {
                if (endpointClassName.equals(ejbEndpoint.getClassName())) {
                    for (final String handlerClassName : mapping.getHandlers(endpointClassName)) {
                        final String ejbEndpointName = ejbEndpoint.getName();
                        final String handlerName = ejbEndpointName + "-" + handlerClassName;
                        final ComponentDescription jaxwsHandlerDescription = createComponentDescription(unit, handlerName, handlerClassName, ejbEndpointName);
                        propagateNamingContext(jaxwsHandlerDescription, ejbEndpoint);
                    }
                }
            }
        } else {
            for (final POJOEndpoint pojoEndpoint : getJaxwsPojos(unit)) {
                if (endpointClassName.equals(pojoEndpoint.getClassName())) {
                    for (final String handlerClassName : mapping.getHandlers(endpointClassName)) {
                        final String pojoEndpointName = pojoEndpoint.getName();
                        final String handlerName = pojoEndpointName + "-" + handlerClassName;
                        createComponentDescription(unit, handlerName, handlerClassName, pojoEndpointName);
                    }
                }
View Full Code Here

Examples of org.jboss.as.webservices.injection.WSEndpointHandlersMapping

        return new UnifiedHandlerChainsMetaData(new UnifiedHandlerChainMetaData(null, null, null, handlers, false, null));
    }

    private void registerHandlersWithAS(DeploymentUnit unit, String endpointClass, List<String> handlersToAdd) {

        WSEndpointHandlersMapping mapping = unit.getAttachment(WSAttachmentKeys.WS_ENDPOINT_HANDLERS_MAPPING_KEY);
        if (mapping == null) {
            mapping = new WSEndpointHandlersMapping();
            unit.putAttachment(WSAttachmentKeys.WS_ENDPOINT_HANDLERS_MAPPING_KEY, mapping);
        }

        Set<String> existingHandlers = mapping.getHandlers(endpointClass);
        if (existingHandlers == null) {
            existingHandlers = new HashSet<String>();
        } else {
            //Existing collection is an unmodifiableSet
            existingHandlers = new HashSet<String>(existingHandlers);
        }

        for (String handler : handlersToAdd) {
            existingHandlers.add(handler);
        }
        mapping.registerEndpointHandlers(endpointClass, existingHandlers);
    }
View Full Code Here

Examples of org.jboss.as.webservices.injection.WSEndpointHandlersMapping

    }

    private boolean isAnyOfHandlersRegistered(final DeploymentUnit unit, final String endpointClass,
            final List<String> handlers) {

        final WSEndpointHandlersMapping mapping = unit.getAttachment(WSAttachmentKeys.WS_ENDPOINT_HANDLERS_MAPPING_KEY);

        if (mapping == null) {
            return false;
        }

        final Set<String> existingHandlers = mapping.getHandlers(endpointClass);

        if (existingHandlers == null) {
            return false;
        }
View Full Code Here

Examples of org.jboss.as.webservices.injection.WSEndpointHandlersMapping

    public WSIntegrationProcessorJAXWS_HANDLER() {
    }

    @Override
    protected void processAnnotation(final DeploymentUnit unit, final EEModuleDescription moduleDescription) throws DeploymentUnitProcessingException {
        final WSEndpointHandlersMapping mapping = getOptionalAttachment(unit, WS_ENDPOINT_HANDLERS_MAPPING_KEY);
        if (mapping == null)
            return;
        for (EEModuleClassDescription classDescription : moduleDescription.getClassDescriptions()) {
            ClassInfo classInfo = null;
            ClassAnnotationInformation<WebService, WebServiceAnnotationInfo> annotationInfo = classDescription
                    .getAnnotationInformation(WebService.class);
            if (annotationInfo != null) {
                classInfo = (ClassInfo) annotationInfo.getClassLevelAnnotations().get(0).getTarget();
            }
            final ClassAnnotationInformation<WebServiceProvider, WebServiceProviderAnnotationInfo> providreInfo = classDescription
                        .getAnnotationInformation(WebServiceProvider.class);
            if (providreInfo != null) {
                classInfo = (ClassInfo) providreInfo.getClassLevelAnnotations().get(0).getTarget();
            }
            if (classInfo != null && mapping.getHandlers(classInfo.name().toString()) != null) {
                final String endpointClassName = classInfo.name().toString();
                if (isEjb3(classInfo)) {
                    for (final EJBEndpoint ejbEndpoint : getJaxwsEjbs(unit)) {
                        if (endpointClassName.equals(ejbEndpoint.getClassName())) {
                            for (final String handlerClassName : mapping.getHandlers(endpointClassName)) {
                                final String ejbEndpointName = ejbEndpoint.getName();
                                final String handlerName = ejbEndpointName + "-" + handlerClassName;
                                final ComponentDescription jaxwsHandlerDescription = createComponentDescription(unit,
                                        handlerName, handlerClassName, ejbEndpointName);
                                propagateNamingContext(jaxwsHandlerDescription, ejbEndpoint);
                            }
                        }
                    }
                } else {
                    for (final POJOEndpoint pojoEndpoint : getJaxwsPojos(unit)) {
                        if (endpointClassName.equals(pojoEndpoint.getClassName())) {
                            for (final String handlerClassName : mapping.getHandlers(endpointClassName)) {
                                final String pojoEndpointName = pojoEndpoint.getName();
                                final String handlerName = pojoEndpointName + "-" + handlerClassName;
                                createComponentDescription(unit, handlerName, handlerClassName, pojoEndpointName);
                            }
                        }
View Full Code Here

Examples of org.jboss.as.webservices.injection.WSEndpointHandlersMapping

        super(HANDLER_CHAIN_ANNOTATION);
    }

    @Override
    protected void processAnnotation(final DeploymentUnit unit, final ClassInfo classInfo, final AnnotationInstance wsAnnotation, final CompositeIndex compositeIndex) throws DeploymentUnitProcessingException {
        final WSEndpointHandlersMapping mapping = getOptionalAttachment(unit, WS_ENDPOINT_HANDLERS_MAPPING_KEY);
        if (mapping == null)
            return;

        final String endpointClassName = classInfo.name().toString();

        if (isEjb3(classInfo)) {
            for (final EJBEndpoint ejbEndpoint : getJaxwsEjbs(unit)) {
                if (endpointClassName.equals(ejbEndpoint.getClassName())) {
                    for (final String handlerClassName : mapping.getHandlers(endpointClassName)) {
                        final String ejbEndpointName = ejbEndpoint.getName();
                        final String handlerName = ejbEndpointName + "-" + handlerClassName;
                        final ComponentDescription jaxwsHandlerDescription = createComponentDescription(unit, handlerName, handlerClassName, ejbEndpointName);
                        propagateNamingContext(jaxwsHandlerDescription, ejbEndpoint);
                    }
                }
            }
        } else {
            for (final POJOEndpoint pojoEndpoint : getJaxwsPojos(unit)) {
                if (endpointClassName.equals(pojoEndpoint.getClassName())) {
                    for (final String handlerClassName : mapping.getHandlers(endpointClassName)) {
                        final String pojoEndpointName = pojoEndpoint.getName();
                        final String handlerName = pojoEndpointName + "-" + handlerClassName;
                        createComponentDescription(unit, handlerName, handlerClassName, pojoEndpointName);
                    }
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.