Examples of MethodDescriptionComposite


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

        // Make sure all the methods in the SEI (including any inherited from superinterfaces) are
        // implemented by the bean (including inherited methods on the bean), taking into
        // account overloaded methods.
        Iterator<MethodDescriptionComposite> verifySEIIterator = seiMethods.iterator();
        while (verifySEIIterator.hasNext()) {
            MethodDescriptionComposite seiMDC = verifySEIIterator.next();
           
            // Make sure the implementation implements this SEI method.  Since we have to account
            // for method overloading, we look for ALL methods with the same name in the
            // implementation, then from that collection of methods, we look for one that has the
            // same parameters.  If we find one with the same parameters, then we check the return
            // and exceptions.  Note that in Java, overloaded methods are ones that have the same
            // name but different parameters; a difference in the return type or thrown exceptions
            // does not constitute overloading and is a compile error.
            Iterator<MethodDescriptionComposite> implMDCIterator = implMethods.iterator();
            boolean methodImplFound = false;
            while (implMDCIterator.hasNext()) {
                MethodDescriptionComposite implMDC = implMDCIterator.next();
               
                if (seiMDC.getMethodName().equals(implMDC.getMethodName())) {
                    // The method names match, so now check the parameters
                    try {
                        validateMethodParameters(seiMDC, implMDC, seic.getClassName());
                        methodImplFound = true;
                    }
View Full Code Here

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

    private void addSuperClassMethods(List<MethodDescriptionComposite> methodList, DescriptionBuilderComposite dbc) {
        DescriptionBuilderComposite superDBC = dbcMap.get(dbc.getSuperClassName());
        if (superDBC != null) {
            Iterator<MethodDescriptionComposite> mIter = superDBC.getMethodDescriptionsList().iterator();
            while (mIter.hasNext()) {
                MethodDescriptionComposite mdc = mIter.next();
                methodList.add(mdc);
            }
            addSuperClassMethods(methodList, superDBC);
        }
    }
View Full Code Here

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

        validateMethods(seic.getMethodDescriptionsList());
    }

    /** @return Returns TRUE if we find just one WebMethod Annotation */
    private boolean webMethodAnnotationsExist() {
        MethodDescriptionComposite mdc = null;
        Iterator<MethodDescriptionComposite> iter =
                composite.getMethodDescriptionsList().iterator();

        while (iter.hasNext()) {
            mdc = iter.next();

            if (mdc.getWebMethodAnnot() != null)
                return true;
        }

        return false;
    }
View Full Code Here

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

        webServiceAnnot.setWsdlLocation(wsdlLocation);
        webServiceAnnot.setTargetNamespace(targetNamespace);
        webServiceAnnot.setServiceName("EchoMessageService");
        webServiceAnnot.setPortName("EchoMessagePort");

        MethodDescriptionComposite mdc = new MethodDescriptionComposite();
        mdc.setMethodName("echoMessage");
        mdc.setReturnType("java.lang.String");

        ParameterDescriptionComposite pdc1 = new ParameterDescriptionComposite();
        pdc1.setParameterType("java.lang.String");

        mdc.addParameterDescriptionComposite(pdc1);

        dbc.addMethodDescriptionComposite(mdc);
        dbc.setWebServiceAnnot(webServiceAnnot);
        dbc.setClassName(BindingNSImpl.class.getName());
        dbc.setWsdlDefinition(wsdlDefn);
View Full Code Here

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

        webServiceAnnot.setWsdlLocation(wsdlLocation);
        webServiceAnnot.setTargetNamespace(targetNamespace);
        webServiceAnnot.setServiceName("EchoMessageService");
        webServiceAnnot.setPortName("EchoMessagePort");

        MethodDescriptionComposite mdc = new MethodDescriptionComposite();
        mdc.setMethodName("echoMessage");
        mdc.setReturnType("java.lang.String");

        ParameterDescriptionComposite pdc1 = new ParameterDescriptionComposite();
        pdc1.setParameterType("java.lang.String");

        mdc.addParameterDescriptionComposite(pdc1);

        dbc.addMethodDescriptionComposite(mdc);
        dbc.setWebServiceAnnot(webServiceAnnot);
        dbc.setClassName(BindingNSImpl.class.getName());
        dbc.setWsdlDefinition(wsdlDefn);
View Full Code Here

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

    public void testValidateImplMethodsVsSEI() {

        DescriptionBuilderComposite seiComposite = new DescriptionBuilderComposite();
        seiComposite.setClassName("org.apache.axis2.jaxws.description.impl.MySEI");
        MethodDescriptionComposite seiMDC = new MethodDescriptionComposite();
        seiMDC.setMethodName("seiMethod");
        seiComposite.addMethodDescriptionComposite(seiMDC);

        DescriptionBuilderComposite implComposite = new DescriptionBuilderComposite();
        implComposite.setClassName("org.apache.axis2.jaxws.description.impl.MyImpl");
        MethodDescriptionComposite implMDC = new MethodDescriptionComposite();
        implMDC.setMethodName("notSeiMethod");
        implComposite.addMethodDescriptionComposite(implMDC);
        WebServiceAnnot webServiceAnnot = WebServiceAnnot.createWebServiceAnnotImpl();
        webServiceAnnot.setName(null);
        webServiceAnnot.setEndpointInterface("org.apache.axis2.jaxws.description.impl.MySEI");
        implComposite.setWebServiceAnnot(webServiceAnnot);
View Full Code Here

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

    public void testValidateImplMethodsVsSEIInheritence() {

        DescriptionBuilderComposite superSeiComposite = new DescriptionBuilderComposite();
        superSeiComposite.setClassName("org.apache.axis2.jaxws.description.impl.MySuperSEI");
        MethodDescriptionComposite superSeiMDC = new MethodDescriptionComposite();
        superSeiMDC.setMethodName("superSeiMethod");
        superSeiComposite.addMethodDescriptionComposite(superSeiMDC);

        DescriptionBuilderComposite seiComposite = new DescriptionBuilderComposite();
        seiComposite.setClassName("org.apache.axis2.jaxws.description.impl.MySEI");
        MethodDescriptionComposite seiMDC = new MethodDescriptionComposite();
        seiMDC.setMethodName("seiMethod");
        seiComposite.addMethodDescriptionComposite(seiMDC);
        seiComposite.setSuperClassName("org.apache.axis2.jaxws.description.impl.MySuperSEI");

        DescriptionBuilderComposite implComposite = new DescriptionBuilderComposite();
        implComposite.setClassName("org.apache.axis2.jaxws.description.impl.MyImpl");
        MethodDescriptionComposite implMDC = new MethodDescriptionComposite();
        implMDC.setMethodName("superSeiMethod");
        implComposite.addMethodDescriptionComposite(implMDC);
        WebServiceAnnot webServiceAnnot = WebServiceAnnot.createWebServiceAnnotImpl();
        webServiceAnnot.setName(null);
        webServiceAnnot.setEndpointInterface("org.apache.axis2.jaxws.description.impl.MySEI");
        implComposite.setWebServiceAnnot(webServiceAnnot);
View Full Code Here

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

    // FAILURE #1: No WebMethod annotation set on the SEI
    public void testInvalidDBC1() {
        DescriptionBuilderComposite seiComposite = new DescriptionBuilderComposite();
        seiComposite.setClassName("org.apache.axis2.jaxws.description.impl.MySEI");
        MethodDescriptionComposite seiMDC = new MethodDescriptionComposite();
        seiMDC.setMethodName("seiMethod");
        seiComposite.addMethodDescriptionComposite(seiMDC);

        DescriptionBuilderComposite superImplComposite = new DescriptionBuilderComposite();
        superImplComposite.setClassName("org.apache.axis2.jaxws.description.impl.MySuperImpl");
        MethodDescriptionComposite superImplMDC = new MethodDescriptionComposite();
        superImplMDC.setMethodName("seiMethod");
        superImplComposite.addMethodDescriptionComposite(superImplMDC);

        DescriptionBuilderComposite implComposite = new DescriptionBuilderComposite();
        implComposite.setClassName("org.apache.axis2.jaxws.description.impl.MyImpl");
        MethodDescriptionComposite implMDC = new MethodDescriptionComposite();
        implMDC.setMethodName("notSeiMethod");
        implComposite.addMethodDescriptionComposite(implMDC);
        WebServiceAnnot webServiceAnnot = WebServiceAnnot.createWebServiceAnnotImpl();
        webServiceAnnot.setName(null);
        webServiceAnnot.setEndpointInterface("org.apache.axis2.jaxws.description.impl.MySEI");
        implComposite.setWebServiceAnnot(webServiceAnnot);
View Full Code Here

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

        assertNotNull(implDBC);
        List<MethodDescriptionComposite> mdcList = sortList(implDBC.getMethodDescriptionsList());
        sortList(mdcList);
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 3);
        MethodDescriptionComposite mdc = mdcList.get(0);
        assertNotNull(mdc);
        assertEquals("<init>", mdc.getMethodName());
        mdc = mdcList.get(1);
        assertNotNull(mdc);
        assertEquals("invoke", mdc.getMethodName());
        assertEquals("java.lang.String", mdc.getReturnType());
        mdc = mdcList.get(2);
        assertNotNull(mdc);
        assertEquals("invoke2", mdc.getMethodName());
        assertEquals("int", mdc.getReturnType());
    }
View Full Code Here

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

    public static void testImplParams() {
        assertNotNull(implDBC);
        List<MethodDescriptionComposite> mdcList = sortList(implDBC.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 3);
        MethodDescriptionComposite mdc = mdcList.get(0);
        assertNotNull(mdc);
        List<ParameterDescriptionComposite> pdcList = mdc.getParameterDescriptionCompositeList();
        assertNotNull(pdcList);
        assertEquals(0, pdcList.size());
        mdc = mdcList.get(1);
        assertNotNull(mdc);
        pdcList = mdc.getParameterDescriptionCompositeList();
        assertNotNull(pdcList);
        assertEquals(pdcList.size(), 1);
        ParameterDescriptionComposite pdc = pdcList.get(0);
        assertEquals("java.util.List<java.lang.String>", pdc.getParameterType());
        mdc = mdcList.get(2);
        pdcList = mdc.getParameterDescriptionCompositeList();
        assertNotNull(pdcList);
        assertEquals(pdcList.size(), 2);
        pdc = pdcList.get(0);
        assertEquals("int", pdc.getParameterType());
        pdc = pdcList.get(1);
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.