Package org.apache.axis2.jaxws.description.builder

Examples of org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite


                    // If this is NOT an implicit SEI, then check for the
                    // annotation on the SEI
                    if (!DescriptionUtils.isEmpty(getAnnoWebServiceEndpointInterface())) {

                        DescriptionBuilderComposite seic = getServiceDescriptionImpl().getDBCMap()
                                        .get(composite.getWebServiceAnnot().endpointInterface());
                        if (seic != null) {
                            handlerChainAnnotation = seic.getHandlerChainAnnot();
                        }
                        //TODO else clause for if to throw exception when seic == null
                    }
                }
            } else {
View Full Code Here


        return dbcMap;
    }

    private void buildDBC(HashMap<String, DescriptionBuilderComposite> dbcMap, Class clazz) {
        serviceClass = clazz;
        DescriptionBuilderComposite composite = new DescriptionBuilderComposite();
        introspectClass(composite);
        dbcMap.put(composite.getClassName(), composite);       
    }
View Full Code Here

        super(handlerChainsInfo, seiInfoMap, name, serviceQName, wsdlURI, referenceClassName, serviceClassName);
    }

    @Override
    public Object getContent() throws NamingException {
        DescriptionBuilderComposite composite = null;

        URL catalogURL = getCatalog();
        if (catalogURL != null) {
            composite = new DescriptionBuilderComposite();
            OASISCatalogManager catalogManager = new OASISCatalogManager();
            catalogManager.setCatalogFiles(catalogURL.toString());
            composite.setCatalogManager(catalogManager);
        }

        ServiceDelegate.setServiceMetadata(composite);
        try {
            return super.getContent();
View Full Code Here

    public AxisService getServiceFromClass(Class endpointClass, PortInfo portInfo) throws Exception {
        ServiceDescription serviceDescription = DescriptionFactory.createServiceDescription(endpointClass);
        EndpointDescription targetEndpointDescription = null;
        for (EndpointDescription endpointDescription : serviceDescription.getEndpointDescriptions()) {
            DescriptionBuilderComposite dbc = endpointDescription.getDescriptionBuilderComposite();
            if (endpointClass.getName().equals(dbc.getClassName())) {
                targetEndpointDescription = endpointDescription;
                break;
            }
        }
        if (targetEndpointDescription == null) {
View Full Code Here

        Class<?> endPointClass = classLoader.loadClass(endpointClassName);
        JavaClassToDBCConverter converter = new JavaClassToDBCConverter(endPointClass);
        HashMap<String, DescriptionBuilderComposite> dbcMap = converter.produceDBC();

        DescriptionBuilderComposite dbc = dbcMap.get(endpointClassName);
        dbc.setClassLoader(classLoader);
        dbc.setWsdlDefinition(wsdlDefinition);
        dbc.setClassName(endpointClassName);
        dbc.setCustomWsdlGenerator(new WSDLGeneratorImpl(wsdlDefinition));
        dbc.setCatalogManager(catalogManager);

        if (dbc.getWebServiceAnnot() != null) { //information specified in .wsdl should overwrite annotation.
            WebServiceAnnot serviceAnnot = dbc.getWebServiceAnnot();
            serviceAnnot.setPortName(portQName.getLocalPart());
            serviceAnnot.setServiceName(serviceQName.getLocalPart());
            serviceAnnot.setTargetNamespace(serviceQName.getNamespaceURI());
            processServiceBinding(dbc, protocolBinding);
        } else if (dbc.getWebServiceProviderAnnot() != null) {
            WebServiceProviderAnnot serviceProviderAnnot = dbc.getWebServiceProviderAnnot();
            serviceProviderAnnot.setPortName(portQName.getLocalPart());
            serviceProviderAnnot.setServiceName(serviceQName.getLocalPart());
            serviceProviderAnnot.setTargetNamespace(serviceQName.getNamespaceURI());
            processServiceBinding(dbc, protocolBinding);
        }

        EndpointDescription endpointDescription = getEndpointDescription(dbcMap, endpointClassName);
        //The portInfo is a mixed content of the annotations and webservices.xml file, currently, we have no way to pass the final portInfo
        //to Axis2, so reconfigure those web service features in the endpoint description here.
        configureWebServiceFeatures(endpointDescription, portInfo);
        AxisService service = endpointDescription.getAxisService();

        service.setName(serviceQName.getLocalPart());
        service.setEndpointName(portQName.getLocalPart());

        for(Iterator<AxisOperation> opIterator = service.getOperations() ; opIterator.hasNext() ;){
            AxisOperation operation = opIterator.next();
            operation.setMessageReceiver(this.messageReceiver);
            String MEP = operation.getMessageExchangePattern();
            if (!WSDLUtil.isOutputPresentForMEP(MEP)) {
                List<MethodDescriptionComposite> mdcList = dbc.getMethodDescriptionComposite(operation.getName().toString());
                for(Iterator<MethodDescriptionComposite> mIterator = mdcList.iterator(); mIterator.hasNext();){
                    MethodDescriptionComposite mdc = mIterator.next();
                    //TODO: JAXWS spec says need to check Holder param exist before taking a method as OneWay
                    mdc.setOneWayAnnot(true);
                }
View Full Code Here

        if (serviceDescList == null || serviceDescList.isEmpty()) {
            throw new RuntimeException("No service found for SEI class " + endpointClassName);
        }
        for(ServiceDescription serviceDescription : serviceDescList) {
            for(EndpointDescription endpointDescription : serviceDescription.getEndpointDescriptions()) {
                DescriptionBuilderComposite dbc = endpointDescription.getDescriptionBuilderComposite();
                if(endpointClassName.equals(dbc.getClassName())) {
                    return endpointDescription;
                }
            }
        }
        throw new RuntimeException("No endpoint found for SEI class " + endpointClassName);
View Full Code Here

       
        Class endPointClass = classLoader.loadClass(endpointClassName);
        JavaClassToDBCConverter converter = new JavaClassToDBCConverter(endPointClass);
        HashMap<String, DescriptionBuilderComposite> dbcMap = converter.produceDBC();
      
        DescriptionBuilderComposite dbc = dbcMap.get(endpointClassName);
        dbc.setClassLoader(classLoader);
        dbc.setWsdlDefinition(wsdlDefinition);
        dbc.setClassName(endpointClassName);
        dbc.setCustomWsdlGenerator(new WSDLGeneratorImpl(wsdlDefinition));
       
        if (dbc.getWebServiceAnnot() != null) { //information specified in .wsdl should overwrite annotation.
            WebServiceAnnot serviceAnnot = dbc.getWebServiceAnnot();
            serviceAnnot.setPortName(portQName.getLocalPart());
            serviceAnnot.setServiceName(serviceQName.getLocalPart());
            serviceAnnot.setTargetNamespace(serviceQName.getNamespaceURI());
            if (dbc.getBindingTypeAnnot() !=null && bindingS != null && !bindingS.equals("")) {
                BindingTypeAnnot bindingAnnot = dbc.getBindingTypeAnnot();
                bindingAnnot.setValue(bindingS);
            }
        } else if (dbc.getWebServiceProviderAnnot() != null) {
            WebServiceProviderAnnot serviceProviderAnnot = dbc.getWebServiceProviderAnnot();
            serviceProviderAnnot.setPortName(portQName.getLocalPart());
            serviceProviderAnnot.setServiceName(serviceQName.getLocalPart());
            serviceProviderAnnot.setTargetNamespace(serviceQName.getNamespaceURI());
            if (dbc.getBindingTypeAnnot() !=null && bindingS != null && !bindingS.equals("")) {
                BindingTypeAnnot bindingAnnot = dbc.getBindingTypeAnnot();
                bindingAnnot.setValue(bindingS);
            }
        }

        AxisService service = getService(dbcMap);      
       
        service.setName(serviceQName.getLocalPart());
        service.setEndpointName(portQName.getLocalPart());
       
        for(Iterator<AxisOperation> opIterator = service.getOperations() ; opIterator.hasNext() ;){
            AxisOperation operation = opIterator.next();
            operation.setMessageReceiver(this.messageReceiver);
            String MEP = operation.getMessageExchangePattern();
            if (!WSDLUtil.isOutputPresentForMEP(MEP)) {
                List<MethodDescriptionComposite> mdcList = dbc.getMethodDescriptionComposite(operation.getName().toString());
                for(Iterator<MethodDescriptionComposite> mIterator = mdcList.iterator(); mIterator.hasNext();){
                    MethodDescriptionComposite mdc = mIterator.next();
                    //TODO: JAXWS spec says need to check Holder param exist before taking a method as OneWay
                    mdc.setOneWayAnnot(true);
                }
View Full Code Here

    public AxisService getServiceFromClass(Class endpointClass, PortInfo portInfo) throws Exception {
        ServiceDescription serviceDescription = DescriptionFactory.createServiceDescription(endpointClass);
        EndpointDescription targetEndpointDescription = null;
        for (EndpointDescription endpointDescription : serviceDescription.getEndpointDescriptions()) {
            DescriptionBuilderComposite dbc = endpointDescription.getDescriptionBuilderComposite();
            if (endpointClass.getName().equals(dbc.getClassName())) {
                targetEndpointDescription = endpointDescription;
                break;
            }
        }
        if (targetEndpointDescription == null) {
View Full Code Here

        Class<?> endPointClass = classLoader.loadClass(endpointClassName);
        JavaClassToDBCConverter converter = new JavaClassToDBCConverter(endPointClass);
        HashMap<String, DescriptionBuilderComposite> dbcMap = converter.produceDBC();

        DescriptionBuilderComposite dbc = dbcMap.get(endpointClassName);
        dbc.setClassLoader(classLoader);
        dbc.setWsdlDefinition(wsdlDefinition);
        dbc.setClassName(endpointClassName);
        dbc.setCustomWsdlGenerator(new WSDLGeneratorImpl(wsdlDefinition));
        dbc.setCatalogManager(catalogManager);

        if (dbc.getWebServiceAnnot() != null) { //information specified in .wsdl should overwrite annotation.
            WebServiceAnnot serviceAnnot = dbc.getWebServiceAnnot();
            serviceAnnot.setPortName(portQName.getLocalPart());
            serviceAnnot.setServiceName(serviceQName.getLocalPart());
            serviceAnnot.setTargetNamespace(serviceQName.getNamespaceURI());
            processServiceBinding(dbc, protocolBinding);
        } else if (dbc.getWebServiceProviderAnnot() != null) {
            WebServiceProviderAnnot serviceProviderAnnot = dbc.getWebServiceProviderAnnot();
            serviceProviderAnnot.setPortName(portQName.getLocalPart());
            serviceProviderAnnot.setServiceName(serviceQName.getLocalPart());
            serviceProviderAnnot.setTargetNamespace(serviceQName.getNamespaceURI());
            processServiceBinding(dbc, protocolBinding);
        }

        EndpointDescription endpointDescription = getEndpointDescription(dbcMap, endpointClassName);
        //The portInfo is a mixed content of the annotations and webservices.xml file, currently, we have no way to pass the final portInfo
        //to Axis2, so reconfigure those web service features in the endpoint description here.
        configureWebServiceFeatures(endpointDescription, portInfo);
        AxisService service = endpointDescription.getAxisService();

        service.setName(serviceQName.getLocalPart());
        service.setEndpointName(portQName.getLocalPart());

        for(Iterator<AxisOperation> opIterator = service.getOperations() ; opIterator.hasNext() ;){
            AxisOperation operation = opIterator.next();
            operation.setMessageReceiver(this.messageReceiver);
            String MEP = operation.getMessageExchangePattern();
            if (!WSDLUtil.isOutputPresentForMEP(MEP)) {
                List<MethodDescriptionComposite> mdcList = dbc.getMethodDescriptionComposite(operation.getName().toString());
                for(Iterator<MethodDescriptionComposite> mIterator = mdcList.iterator(); mIterator.hasNext();){
                    MethodDescriptionComposite mdc = mIterator.next();
                    //TODO: JAXWS spec says need to check Holder param exist before taking a method as OneWay
                    mdc.setOneWayAnnot(true);
                }
View Full Code Here

        if (serviceDescList == null || serviceDescList.isEmpty()) {
            throw new RuntimeException("No service found for SEI class " + endpointClassName);
        }
        for(ServiceDescription serviceDescription : serviceDescList) {
            for(EndpointDescription endpointDescription : serviceDescription.getEndpointDescriptions()) {
                DescriptionBuilderComposite dbc = endpointDescription.getDescriptionBuilderComposite();
                if(endpointClassName.equals(dbc.getClassName())) {
                    return endpointDescription;
                }
            }
        }
        throw new RuntimeException("No endpoint found for SEI class " + endpointClassName);
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite

Copyright © 2018 www.massapicom. 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.