Examples of JAXWSDeployment


Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

    }

    private static void processAnnotation(final DeploymentUnit unit, final DotName annotation) {
        final List<AnnotationInstance> webServiceAnnotations = getAnnotations(unit, annotation);
        final EEModuleDescription moduleDescription = getRequiredAttachment(unit, EE_MODULE_DESCRIPTION);
        final JAXWSDeployment jaxwsDeployment = getJaxwsDeployment(unit);

        for (final AnnotationInstance webServiceAnnotation : webServiceAnnotations) {
            final AnnotationTarget target = webServiceAnnotation.target();
            final ClassInfo webServiceClassInfo = (ClassInfo) target;
            final String webServiceClassName = webServiceClassInfo.name().toString();
            final List<ComponentDescription> componentDescriptions = moduleDescription.getComponentsByClassName(webServiceClassName);
            final List<SessionBeanComponentDescription> sessionBeans = getSessionBeans(componentDescriptions);
            final Set<String> securityRoles = getSecurityRoles(unit, webServiceClassInfo); // TODO: assembly processed for each endpoint!
            final WebContextAnnotationWrapper webCtx = getWebContextWrapper(webServiceClassInfo);
            final String authMethod = webCtx.getAuthMethod();
            final boolean isSecureWsdlAccess = webCtx.isSecureWsdlAccess();
            final String transportGuarantee = webCtx.getTransportGuarantee();


            for (final SessionBeanComponentDescription sessionBean : sessionBeans) {
                if (sessionBean.isStateless() || sessionBean.isSingleton()) {
                    final EJBViewDescription ejbViewDescription = sessionBean.addWebserviceEndpointView();
                    final ServiceName ejbViewName = ejbViewDescription.getServiceName();
                    jaxwsDeployment.addEndpoint(new EJBEndpoint(sessionBean, ejbViewName, securityRoles, authMethod, isSecureWsdlAccess, transportGuarantee));
                }
            }
        }
    }
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

*/
final class SecurityMetaDataAccessorEJB3 extends AbstractSecurityMetaDataAccessorEJB {

    @Override
    protected List<EJBEndpoint> getEjbEndpoints(final Deployment dep) {
        final JAXWSDeployment jaxwsDeployment = WSHelper.getRequiredAttachment(dep, JAXWSDeployment.class);
        return jaxwsDeployment.getEjbEndpoints();
    }
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

       final CompositeIndex compositeIndex = getRequiredAttachment(unit, Attachments.COMPOSITE_ANNOTATION_INDEX);
       return compositeIndex.getAnnotations(annotation);
    }

    public static JAXWSDeployment getJaxwsDeployment(final DeploymentUnit unit) {
        JAXWSDeployment wsDeployment = unit.getAttachment(JAXWS_ENDPOINTS_KEY);
        if (wsDeployment == null) {
            wsDeployment = new JAXWSDeployment();
            unit.putAttachment(JAXWS_ENDPOINTS_KEY, wsDeployment);
        }
        return wsDeployment;
    }
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

        }

        final String endpointClassName = classInfo.name().toString();
        final JBossWebMetaData jbossWebMD = getJBossWebMetaData(unit);
        if (jbossWebMD != null) {
            final JAXWSDeployment jaxwsDeployment = getJaxwsDeployment(unit);
            boolean found = false;
            for (final ServletMetaData servletMD : getServlets(jbossWebMD)) {
                if (endpointClassName.equals(getEndpointClassName(servletMD))) {
                    found = true;
                    // creating component description for POJO endpoint
                    final String endpointName = getEndpointName(servletMD);
                    createComponentDescription(unit, endpointName, endpointClassName, endpointName);
                    // register POJO endpoint
                    final String urlPattern = getUrlPattern(endpointName, unit);
                    jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointName, endpointClassName, urlPattern));
                }
            }
            if (!found) {
                // JSR 109, version 1.3 final spec, section 5.3.2.1 javax.jws.WebService annotation
                createComponentDescription(unit, endpointClassName, endpointClassName, endpointClassName);
                // register POJO endpoint
                final String urlPattern = getUrlPattern(classInfo);
                jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointClassName, urlPattern));
            }
        }
    }
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

                jseArchiveMD.setContextRoot(contextRoot);
                dep.addAttachment(JSEArchiveMetaData.class, jseArchiveMD);
            }
        }

        final JAXWSDeployment jaxwsDeployment = WSHelper.getRequiredAttachment(dep, JAXWSDeployment.class);
        final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
        final JBossWebservicesMetaData jbossWebservicesMD = WSHelper.getOptionalAttachment(dep, JBossWebservicesMetaData.class);

        for (final EJBEndpoint jbossEjbMD : jaxwsDeployment.getEjbEndpoints()) {
            buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD, jbossWebservicesMD);
        }

        ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
    }
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

    public WSEndpointDeploymentUnit(ClassLoader loader, String context, Map<String,String> urlPatternToClassName, WebservicesMetaData metadata) {
        this.deploymentName = context + ".deployment";

        JBossWebMetaData jbossWebMetaData = new JBossWebMetaData();
        JAXWSDeployment jaxwsDeployment = new JAXWSDeployment();
        jbossWebMetaData.setContextRoot(context);
        for (String urlPattern : urlPatternToClassName.keySet()) {
            addEndpoint(jbossWebMetaData, jaxwsDeployment, urlPatternToClassName.get(urlPattern), urlPattern);
        }
        this.putAttachment(WSAttachmentKeys.CLASSLOADER_KEY, loader);
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

     *
     * @param unit deployment unit
     * @return list of JAXWS EJBs meta data
     */
    public static List<EJBEndpoint> getJaxwsEjbs(final DeploymentUnit unit) {
        final JAXWSDeployment jaxwsDeployment = getOptionalAttachment(unit, WSAttachmentKeys.JAXWS_ENDPOINTS_KEY);
        return jaxwsDeployment != null ? jaxwsDeployment.getEjbEndpoints() : Collections.<EJBEndpoint>emptyList();
    }
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

     *
     * @param unit deployment unit
     * @return list of JAXWS POJOs meta data
     */
    public static List<POJOEndpoint> getJaxwsPojos(final DeploymentUnit unit) {
        final JAXWSDeployment jaxwsDeployment = unit.getAttachment(WSAttachmentKeys.JAXWS_ENDPOINTS_KEY);
        return jaxwsDeployment != null ? jaxwsDeployment.getPojoEndpoints() : Collections.<POJOEndpoint>emptyList();
    }
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

        dep.addAttachment(WebservicesMetaData.class, webservicesMD);

        final JBossWebservicesMetaData jbossWebservicesMD = getOptionalAttachment(unit, JBOSS_WEBSERVICES_METADATA_KEY);
        dep.addAttachment(JBossWebservicesMetaData.class, jbossWebservicesMD);

        final JAXWSDeployment jaxwsDeployment = getOptionalAttachment(unit, JAXWS_ENDPOINTS_KEY);
        dep.addAttachment(JAXWSDeployment.class, jaxwsDeployment);

        final JAXRPCDeployment jaxrpcDeployment = getOptionalAttachment(unit, JAXRPC_ENDPOINTS_KEY);
        dep.addAttachment(JAXRPCDeployment.class, jaxrpcDeployment);
View Full Code Here

Examples of org.jboss.as.webservices.metadata.model.JAXWSDeployment

        dep.addAttachment(WebservicesMetaData.class, webservicesMD);

        final JBossWebservicesMetaData jbossWebservicesMD = getOptionalAttachment(unit, JBOSS_WEBSERVICES_METADATA_KEY);
        dep.addAttachment(JBossWebservicesMetaData.class, jbossWebservicesMD);

        final JAXWSDeployment jaxwsDeployment = getOptionalAttachment(unit, JAXWS_ENDPOINTS_KEY);
        dep.addAttachment(JAXWSDeployment.class, jaxwsDeployment);

        final EjbJarMetaData ejbJarMD = getOptionalAttachment(unit, EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
        dep.addAttachment(EjbJarMetaData.class, ejbJarMD);
    }
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.