Examples of MethodDescriptionComposite


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

    public static void testSEIMethods() {
        assertNotNull(seiDBC);
        List<MethodDescriptionComposite> mdcList = sortList(seiDBC.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 2);
        MethodDescriptionComposite mdc = mdcList.get(0);
        assertEquals("invoke", mdc.getMethodName());
        assertEquals("java.lang.String", mdc.getReturnType());
        assertNotNull(mdc.getWebMethodAnnot());
        WebMethodAnnot wmAnnot = mdc.getWebMethodAnnot();
        assertEquals("invoke", wmAnnot.operationName());
        mdc = mdcList.get(1);
        assertEquals("invoke2", mdc.getMethodName());
        assertEquals("int", mdc.getReturnType());
    }
View Full Code Here

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

    public static void testSEIParams() {
        assertNotNull(seiDBC);
        List<MethodDescriptionComposite> mdcList = sortList(seiDBC.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 2);
        MethodDescriptionComposite mdc = mdcList.get(0);
        assertNotNull(mdc);
        List<ParameterDescriptionComposite> pdcList = mdc.getParameterDescriptionCompositeList();
        assertNotNull(pdcList);
        assertEquals(pdcList.size(), 1);
        ParameterDescriptionComposite pdc = pdcList.get(0);
        assertNotNull(pdc);
        assertEquals("java.util.List<java.lang.String>", pdc.getParameterType());
        WebParamAnnot wpAnnot = pdc.getWebParamAnnot();
        assertNotNull(wpAnnot);
        assertEquals("echoString", wpAnnot.name());
        mdc = mdcList.get(1);
        assertNotNull(mdc);
        pdcList = mdc.getParameterDescriptionCompositeList();
        assertNotNull(pdcList);
        assertEquals(pdcList.size(), 2);
        pdc = pdcList.get(0);
        assertNotNull(pdc);
        assertEquals("int", pdc.getParameterType());
View Full Code Here

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

        //Build up the the DBC and all necessary composites
        ParameterDescriptionComposite pdc = new ParameterDescriptionComposite();
        pdc.setParameterType("java.lang.String");
        pdc.setWebParamAnnot(webParamAnnot);

        MethodDescriptionComposite mdc = new MethodDescriptionComposite();
        mdc.setWebMethodAnnot(webMethodAnnot);
        mdc.setMethodName(operationName);
        mdc.addParameterDescriptionComposite(pdc, 0);

        DescriptionBuilderComposite dbc = new DescriptionBuilderComposite();
        dbc.setClassName("org.apache.axis2.samples.EchoServiceAnnotated");
        dbc.setWebServiceAnnot(webServiceAnnot);
        dbc.addMethodDescriptionComposite(mdc);
View Full Code Here

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

        WebServiceAnnot webServiceAnnot = WebServiceAnnot.createWebServiceAnnotImpl();
        assertNotNull(webServiceAnnot);
        webServiceAnnot.setWsdlLocation(wsdlLocation);
        webServiceAnnot.setTargetNamespace(targetNamespace);

        MethodDescriptionComposite mdc = new MethodDescriptionComposite();
        mdc.setMethodName("addTwoNumbers");
        mdc.setReturnType("int");

        ParameterDescriptionComposite pdc1 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");
        ParameterDescriptionComposite pdc2 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");

        mdc.addParameterDescriptionComposite(pdc1);
        mdc.addParameterDescriptionComposite(pdc2);

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

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

        assertNotNull(webServiceAnnot);
        webServiceAnnot.setWsdlLocation(wsdlLocation);
        webServiceAnnot.setTargetNamespace(targetNamespace);
        webServiceAnnot.setServiceName("ValidateWSDLImpl1ServiceInvalidPort");

        MethodDescriptionComposite mdc = new MethodDescriptionComposite();
        mdc.setMethodName("addTwoNumbers");
        mdc.setReturnType("int");

        ParameterDescriptionComposite pdc1 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");
        ParameterDescriptionComposite pdc2 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");

        mdc.addParameterDescriptionComposite(pdc1);
        mdc.addParameterDescriptionComposite(pdc2);

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

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

        WebServiceAnnot webServiceAnnot = WebServiceAnnot.createWebServiceAnnotImpl();
        assertNotNull(webServiceAnnot);
        webServiceAnnot.setWsdlLocation(wsdlLocation);
        webServiceAnnot.setTargetNamespace(targetNamespace);

        MethodDescriptionComposite mdc = new MethodDescriptionComposite();
        mdc.setMethodName("addTwoNumbers");
        mdc.setReturnType("int");

        ParameterDescriptionComposite pdc1 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");
        ParameterDescriptionComposite pdc2 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");

        mdc.addParameterDescriptionComposite(pdc1);
        mdc.addParameterDescriptionComposite(pdc2);

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

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

        WebServiceAnnot webServiceAnnot = WebServiceAnnot.createWebServiceAnnotImpl();
        assertNotNull(webServiceAnnot);
        webServiceAnnot.setWsdlLocation(wsdlLocation);
        webServiceAnnot.setTargetNamespace(targetNamespace);

        MethodDescriptionComposite mdc = new MethodDescriptionComposite();
        mdc.setMethodName("addTwoNumbers");
        mdc.setReturnType("int");

        ParameterDescriptionComposite pdc1 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");
        ParameterDescriptionComposite pdc2 = new ParameterDescriptionComposite();
        pdc1.setParameterType("int");

        mdc.addParameterDescriptionComposite(pdc1);
        mdc.addParameterDescriptionComposite(pdc2);

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

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

            DescriptionBuilderComposite implDBC = dbcMap.get("org.apache.axis2.jaxws.description.ServiceImpl");
            assertNotNull(implDBC);
            List<MethodDescriptionComposite> m1MDCList = implDBC.getMethodDescriptionComposite("method1");
            assertNotNull(m1MDCList);
            assertEquals(1, m1MDCList.size());
            MethodDescriptionComposite m1MDC = m1MDCList.get(0);
            assertEquals("java.lang.String", m1MDC.getReturnType());
            m1MDC.setReturnType("lava.lang.Integer");
           
            List<ServiceDescription> serviceDescList =  DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap);
            fail("Should have caused exception");
        }
        catch (Exception e) {
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

        HashMap<String, MethodDescriptionComposite> compositeHashMap =
            new HashMap<String, MethodDescriptionComposite>();
        Iterator<MethodDescriptionComposite> compIterator =
                composite.getMethodDescriptionsList().iterator();
        while (compIterator.hasNext()) {
            MethodDescriptionComposite mdc = compIterator.next();
            compositeHashMap.put(mdc.getMethodName(), mdc);
        }
        // Add methods declared in the implementation's superclass
        addSuperClassMethods(compositeHashMap, composite);

        HashMap<String, MethodDescriptionComposite> seiMethodHashMap =
            new HashMap<String, MethodDescriptionComposite>();
        Iterator<MethodDescriptionComposite> seiMethodIterator =
                seic.getMethodDescriptionsList().iterator();
        while (seiMethodIterator.hasNext()) {
            MethodDescriptionComposite mdc = seiMethodIterator.next();
            seiMethodHashMap.put(mdc.getMethodName(), mdc);
        }
        // Add any methods declared in superinterfaces of the SEI
        addSuperClassMethods(seiMethodHashMap, seic);

        // Make sure all the methods in the SEI (including any inherited from superinterfaces) are
        // implemented by the bean (including inherited methods on the bean).
        Iterator<MethodDescriptionComposite> verifySEIIterator =
                seiMethodHashMap.values().iterator();
        while (verifySEIIterator.hasNext()) {
            MethodDescriptionComposite mdc = verifySEIIterator.next();
            // TODO: This does not take into consideration overloaded java methods!
            MethodDescriptionComposite implMDC = compositeHashMap.get(mdc.getMethodName());
           
            if (implMDC == null) {
                // TODO: RAS/NLS
                throw ExceptionFactory.makeWebServiceException(
                        "Validation error: Implementation subclass does not implement method on specified interface.  Implementation class: "
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.