Examples of DescriptionBuilderComposite


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

                //in the tooling that allows for the wsdllocation to be specifed on either the
                //impl. class, or the SEI, or both. So, we need to look for the wsdl as follows:
                //          1. If the Wsdl exists on the SEI, then check for it on the impl.
                //          2. If it is not found in either location, in that order, then generate

                DescriptionBuilderComposite seic =
                        getDBCMap().get(composite.getWebServiceAnnot().endpointInterface());

                try {
                    if (seic.getWsdlDefinition() != null) {
                        //set the sdimpl from the SEI composite
                        this.wsdlURL = seic.getWsdlURL();
                        this.wsdlWrapper =
                                new WSDL4JWrapper(seic.getWsdlURL(), seic.getWsdlDefinition());
                    } else if (composite.getWsdlDefinition() != null) {
                        //set the sdimpl from the impl. class composite
                        this.wsdlURL = composite.getWsdlURL();
                        this.wsdlWrapper = new WSDL4JWrapper(composite.getWsdlURL(),
                                                             composite.getWsdlDefinition());
View Full Code Here

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

                }

                //    setWebServiceAnnotDefaults(true=impl); Must happen before we start checking annot
                if (!DescriptionUtils.isEmpty(composite.getWebServiceAnnot().endpointInterface())) {

                    DescriptionBuilderComposite seic =
                            dbcMap.get(composite.getWebServiceAnnot().endpointInterface());

                    //Verify that we can find the SEI in the composite list
                    if (seic == null) {
                        // TODO: RAS/NLS
View Full Code Here

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

     *
     * @param methodMap
     * @param dbc
     */
    private void addSuperClassMethods(HashMap methodMap, DescriptionBuilderComposite dbc) {
        DescriptionBuilderComposite superDBC = dbcMap.get(dbc.getSuperClassName());
        if (superDBC != null) {
            Iterator<MethodDescriptionComposite> mIter =
                    superDBC.getMethodDescriptionsList().iterator();
            while (mIter.hasNext()) {
                MethodDescriptionComposite mdc = mIter.next();
                methodMap.put(mdc.getMethodName(), mdc);
            }
            addSuperClassMethods(methodMap, superDBC);
View Full Code Here

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

            if (webFaultClassNames != null) {
                for (String wfClassName : webFaultClassNames) {
                    //  Try to find this exception class in the dbc list. If we can't find it
                    //  then just assume that its a generic exception.

                    DescriptionBuilderComposite faultDBC = dbcMap.get(wfClassName);

                    if (faultDBC != null) {
                        // JAXWS 3.7 does not require @WebFault annotation
                        // We found a valid exception composite thats annotated
                        buildFaultList.add(new FaultDescriptionImpl(faultDBC, this));
View Full Code Here

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

        List<ServiceDescription> serviceDescriptionList = new ArrayList<ServiceDescription>();

        for (Iterator<DescriptionBuilderComposite> nameIter = dbcMap.values()
                .iterator(); nameIter.hasNext();) {
            DescriptionBuilderComposite serviceImplComposite = nameIter.next();
            if (isImpl(serviceImplComposite)) {
                // process this impl class
                ServiceDescription serviceDescription = new ServiceDescriptionImpl(
                        dbcMap, serviceImplComposite);
                ServiceDescriptionValidator validator =
                        new ServiceDescriptionValidator(serviceDescription);
                if (validator.validate()) {
                    serviceDescriptionList.add(serviceDescription);
                    if (log.isDebugEnabled()) {
                        log.debug("Service Description created from DescriptionComposite: " +
                                serviceDescription);
                    }
                } else {

                    String msg =
                            "The ServiceDescription failed to validate due to the following errors: \n" +
                                    validator.toString();

                    if (log.isDebugEnabled()) {
                        log.debug("Validation Phase 2 failure: " + msg);
                        log.debug("Failing composite: " + serviceImplComposite.toString());
                        log.debug("Failing Service Description: " + serviceDescription.toString());
                    }

                    // TODO: Validate all service descriptions before failing
                    // TODO: Get more detailed failure information from the Validator
                    throw ExceptionFactory.makeWebServiceException(msg);
                }
            } else {
                if (log.isDebugEnabled()) {
                    log.debug("DBC is not a service impl: " + serviceImplComposite.toString());
                }
            }
        }

        // TODO: Process all composites that are WebFaults...current thinking is
View Full Code Here

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

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

    public HashMap<String, DescriptionBuilderComposite> produceDBC() {
        HashMap<String, DescriptionBuilderComposite> dbcMap = new HashMap<String,
                DescriptionBuilderComposite>();
        for (int i = 0; i < classes.size(); i++) {
            serviceClass = classes.get(i);
            DescriptionBuilderComposite composite = new DescriptionBuilderComposite();
            introspectClass(composite);
            dbcMap.put(composite.getClassName(), composite);
            if (seiClassName != null && !seiClassName.equals("")) {
                DescriptionBuilderComposite seiComposite = new DescriptionBuilderComposite();
                try {
                    serviceClass =
                            Thread.currentThread().getContextClassLoader().loadClass(seiClassName);
                    if (serviceClass != null) {
                        introspectClass(seiComposite);
                        dbcMap.put(seiComposite.getClassName(), seiComposite);
                    }
                }
                catch (ClassNotFoundException e) {
                    // TODO: (JLB) Make this an error log?
                    System.out
View Full Code Here

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

            //Now, continue to build this list with relevent methods in the chain of
            //superclasses. If the logic for processing superclasses is the same as for
            //the original SEI, then we can combine this code with above code. But, its possible
            //the logic is different for superclasses...keeping separate for now.
            DescriptionBuilderComposite tempDBC = dbc;

            while (!DescriptionUtils.isEmpty(tempDBC.getSuperClassName())) {

                //verify that this superclass name is not
                //      java.lang.object, if so, then we're done processing
                if (DescriptionUtils.javifyClassName(tempDBC.getSuperClassName())
                        .equals(MDQConstants.OBJECT_CLASS_NAME))
                    break;

                DescriptionBuilderComposite superDBC =
                        getEndpointDescriptionImpl().getServiceDescriptionImpl().getDBCMap()
                                .get(tempDBC.getSuperClassName());

                if (log.isTraceEnabled())
                    log.trace("superclass name for this DBC is:" + tempDBC.getSuperClassName());

                //Verify that we can find the SEI in the composite list
                if (superDBC == null) {
                    throw ExceptionFactory.makeWebServiceException(
                            "EndpointInterfaceDescriptionImpl: cannot find super class that was specified for this class");
                }

                if (superDBC.getWebServiceAnnot() != null) {
                    //Now, gather the list of Methods just like we do for the lowest subclass
                    retrieveList.addAll(retrieveImplicitSEIMethods(superDBC));
                } else {
                    //This superclass does not contain a WebService annotation, add only the
                    //methods that are annotated with WebMethod

                    Iterator<MethodDescriptionComposite> iterMethod =
                            dbc.getMethodDescriptionsList().iterator();

                    while (iterMethod.hasNext()) {
                        MethodDescriptionComposite mdc = iterMethod.next();

                        if (!DescriptionUtils.isExcludeTrue(mdc)) {
                            mdc.setDeclaringClass(superDBC.getClassName());
                            retrieveList.add(mdc);
                        }
                    }
                }
                tempDBC = superDBC;
View Full Code Here

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

        HashMap<String, Integer> hierarchyMap = new HashMap<String, Integer>();
        if (log.isDebugEnabled()) {
            log.debug("Putting class at base level: " + dbc.getClassName());
        }
        hierarchyMap.put(dbc.getClassName(), Integer.valueOf(0));
        DescriptionBuilderComposite superDBC = dbcMap.get((dbc.getSuperClassName()));
        int i = 1;
        while (superDBC != null && !superDBC.getClassName().equals("java.lang.Object")) {
            hierarchyMap.put(superDBC.getClassName(), Integer.valueOf(i));
            if (log.isDebugEnabled()) {
                log.debug("Putting class: " + superDBC.getClassName() + " at hierarchy rank: " +
                        i);
            }
            i++;
            superDBC = dbcMap.get(superDBC.getSuperClassName());
        }
        return hierarchyMap;
    }
View Full Code Here

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

    }

    private ArrayList<MethodDescriptionComposite> retrieveSEIMethodsChain(
            DescriptionBuilderComposite tmpDBC) {

        DescriptionBuilderComposite dbc = tmpDBC;
        ArrayList<MethodDescriptionComposite> retrieveList =
                new ArrayList<MethodDescriptionComposite>();

        retrieveList = retrieveSEIMethods(dbc);

        //Since this is an interface, anything that is in the extends clause will actually appear
        // in the interfaces list instead.
        Iterator<String> iter = null;
        List<String> interfacesList = dbc.getInterfacesList();
        if (interfacesList != null) {
            iter = dbc.getInterfacesList().iterator();

            while (iter.hasNext()) {

                String interfaceName = iter.next();
                DescriptionBuilderComposite superInterface =
                        getEndpointDescriptionImpl().getServiceDescriptionImpl().getDBCMap()
                                .get(interfaceName);

                retrieveList.addAll(retrieveSEIMethodsChain(superInterface));
            }
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.