Examples of POJOEndpoint


Examples of org.apache.camel.component.pojo.PojoEndpoint

    protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception {
        notNull(applicationContext, "applicationContext");
        Object object = applicationContext.getBean(remaining);
        if (object != null) {
            return new PojoEndpoint(uri, this, object);
        }
        return null;
    }
View Full Code Here

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

    private static void createJaxrpcDeployment(final DeploymentUnit unit, final WebservicesMetaData webservicesMD, final JBossWebMetaData jbossWebMD) {
        final JAXRPCDeployment jaxrpcDeployment = getJaxrpcDeployment(unit);

        for (final WebserviceDescriptionMetaData wsDescriptionMD : webservicesMD.getWebserviceDescriptions()) {
            for (final PortComponentMetaData portComponentMD : wsDescriptionMD.getPortComponents()) {
                final POJOEndpoint pojoEndpoint = newPojoEndpoint(portComponentMD, jbossWebMD);
                jaxrpcDeployment.addEndpoint(pojoEndpoint);
            }
        }
    }
View Full Code Here

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

        final String endpointName = portComponentMD.getServletLink();
        final ServletMetaData servletMD = getServletForName(jbossWebMD, endpointName);
        final String endpointClassName = getEndpointClassName(servletMD);
        final String urlPattern = getUrlPattern(endpointName, jbossWebMD);

        return new POJOEndpoint(endpointName, endpointClassName, urlPattern);
    }
View Full Code Here

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

                    // 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.POJOEndpoint

            urlPattern = urlPattern.trim();
            if (!urlPattern.startsWith("/")) {
                urlPattern = "/" + urlPattern;
            }
        }
        jaxwsDeployment.addEndpoint(new POJOEndpoint(className, urlPattern));
    }
View Full Code Here

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

                    // creating component description for POJO endpoint
                    final ComponentDescription pojoComponent = createComponentDescription(unit, endpointName,
                            endpointClassName, endpointName);
                    final ServiceName pojoViewName = registerView(pojoComponent, endpointClassName);
                    final String urlPattern = getUrlPattern(endpointName, unit);
                    jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointName, endpointClassName, pojoViewName, urlPattern));
                    classDescriptionMap.remove(endpointClassName);
                    matchedEps.add(endpointClassName);
                } else {
                    if (unit.getParent() != null && DeploymentTypeMarker.isType(DeploymentType.EAR, unit.getParent())) {
                        final EEModuleDescription eeModuleDescription = unit.getParent().getAttachment(
                                org.jboss.as.ee.component.Attachments.EE_MODULE_DESCRIPTION);
                        final CompositeIndex parentIndex = unit.getParent().getAttachment( Attachments.COMPOSITE_ANNOTATION_INDEX);
                        for (EEModuleClassDescription classDescription : eeModuleDescription.getClassDescriptions()) {
                            if (classDescription.getClassName().equals(endpointClassName)
                                    && isJaxwsEndpoint(classDescription, parentIndex)) {
                                final ComponentDescription pojoComponent = createComponentDescription(unit, endpointName,
                                        endpointClassName, endpointName);
                                final ServiceName pojoViewName = registerView(pojoComponent, endpointClassName);
                                final String urlPattern = getUrlPattern(endpointName, unit);
                                jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointName, endpointClassName, pojoViewName, urlPattern));

                            }
                        }
                    }
                }
            }
        }

        for (EEModuleClassDescription classDescription : classDescriptionMap.values()) {
            ClassInfo classInfo = null;
            String serviceName = null;
            String urlPattern = null;

            // #1 Override serviceName with the explicit urlPattern from port-component/port-component-uri in jboss-webservices.xml
            EJBEndpoint ejbEndpoint = getWebserviceMetadataEJBEndpoint(jaxwsDeployment, classDescription.getClassName());
            if (ejbEndpoint != null) {
                urlPattern = UrlPatternUtils.getUrlPatternByPortComponentURI(
                    getJBossWebserviceMetaDataPortComponent(unit, ejbEndpoint.getName()));
            }

            // #2 Override serviceName with @WebContext.urlPattern
            if (urlPattern == null) {
                final ClassAnnotationInformation<WebContext, WebContextAnnotationInfo> annotationWebContext =
                    classDescription.getAnnotationInformation(WebContext.class);
                if (annotationWebContext != null) {
                    WebContextAnnotationInfo wsInfo = annotationWebContext.getClassLevelAnnotations().get(0);
                    if (wsInfo != null && wsInfo.getUrlPattern().length() > 0) {
                        urlPattern = wsInfo.getUrlPattern();
                    }
                }
            }

            // #3 use serviceName declared in a class annotation
            if (urlPattern == null) {
                final ClassAnnotationInformation<WebService, WebServiceAnnotationInfo> annotationInfo = classDescription
                    .getAnnotationInformation(WebService.class);
                if (annotationInfo != null) {
                    WebServiceAnnotationInfo wsInfo = annotationInfo.getClassLevelAnnotations().get(0);
                    serviceName = wsInfo.getServiceName();
                    classInfo = (ClassInfo)wsInfo.getTarget();

                    urlPattern = UrlPatternUtils.getUrlPattern(classInfo.name().local(), serviceName);
                    if (jaxwsDeployment.contains(urlPattern)){
                        urlPattern = UrlPatternUtils.getUrlPattern(classInfo.name().local(), serviceName, wsInfo.getName());
                    }
                }

                final ClassAnnotationInformation<WebServiceProvider, WebServiceProviderAnnotationInfo> annotationProviderInfo = classDescription
                    .getAnnotationInformation(WebServiceProvider.class);
                if (annotationProviderInfo != null) {
                    WebServiceProviderAnnotationInfo wsInfo = annotationProviderInfo.getClassLevelAnnotations().get(0);
                    serviceName = wsInfo.getServiceName();
                    classInfo = (ClassInfo)wsInfo.getTarget();
                }
            }

            if (classInfo != null) {
                final String endpointClassName = classDescription.getClassName();
                final ComponentDescription pojoComponent = createComponentDescription(unit, endpointClassName,
                        endpointClassName, endpointClassName);
                final ServiceName pojoViewName = registerView(pojoComponent, endpointClassName);
                if (urlPattern == null) {
                    urlPattern = UrlPatternUtils.getUrlPattern(classInfo.name().local(), serviceName);
                }
                // register POJO endpoint
                jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointClassName,
                    pojoViewName, UrlPatternUtils.getUrlPattern(urlPattern)));
            }
        }

    }
View Full Code Here

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

            urlPattern = urlPattern.trim();
            if (!urlPattern.startsWith("/")) {
                urlPattern = "/" + urlPattern;
            }
        }
        jaxwsDeployment.addEndpoint(new POJOEndpoint(endpointName, className, null, urlPattern, false));
    }
View Full Code Here

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

    private static void createJaxrpcDeployment(final DeploymentUnit unit, final WebservicesMetaData webservicesMD, final JBossWebMetaData jbossWebMD) {
        final JAXRPCDeployment jaxrpcDeployment = getJaxrpcDeployment(unit);

        for (final WebserviceDescriptionMetaData wsDescriptionMD : webservicesMD.getWebserviceDescriptions()) {
            for (final PortComponentMetaData portComponentMD : wsDescriptionMD.getPortComponents()) {
                final POJOEndpoint pojoEndpoint = newPojoEndpoint(portComponentMD, jbossWebMD);
                jaxrpcDeployment.addEndpoint(pojoEndpoint);
            }
        }
    }
View Full Code Here

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

        final String endpointName = portComponentMD.getServletLink();
        final ServletMetaData servletMD = getServletForName(jbossWebMD, endpointName);
        final String endpointClassName = getEndpointClassName(servletMD);
        final String urlPattern = getUrlPattern(endpointName, jbossWebMD);

        return new POJOEndpoint(endpointName, endpointClassName, urlPattern);
    }
View Full Code Here

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

            urlPattern = urlPattern.trim();
            if (!urlPattern.startsWith("/")) {
                urlPattern = "/" + urlPattern;
            }
        }
        jaxwsDeployment.addEndpoint(new POJOEndpoint(className, urlPattern));
    }
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.