Examples of DescriptionBuilderComposite


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

        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();
            Catalog catalog = catalogManager.getCatalog();
            try {
                catalog.parseCatalog(catalogURL);
            } catch (IOException e) {
                NamingException toThrow = new NamingException("Fail to parse catalog file " + catalogURL.toString());
                toThrow.initCause(e);
                throw toThrow;
            }           
            composite.setCatalogManager(catalogManager);
        }

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

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

     * @param sei
     * @param parent
     */
    EndpointInterfaceDescriptionImpl(Class sei, EndpointDescriptionImpl parent) {
        parentEndpointDescription = parent;
        dbc = new DescriptionBuilderComposite();
        dbc.setCorrespondingClass(sei);

        // Per JSR-181 all methods on the SEI are mapped to operations regardless
        // of whether they include an @WebMethod annotation.  That annotation may
        // be present to customize the mapping, but is not required (p14)
View Full Code Here

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

     *
     * @param parent
     */
    EndpointInterfaceDescriptionImpl(EndpointDescriptionImpl parent) {
        parentEndpointDescription = parent;
        dbc = new DescriptionBuilderComposite();
        AxisService axisService = parentEndpointDescription.getAxisService();
        if (axisService != null) {
            ArrayList publishedOperations = axisService.getPublishedOperations();
            Iterator operationsIterator = publishedOperations.iterator();
            while (operationsIterator.hasNext()) {
View Full Code Here

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

        }
        return returnServiceDelegate;
    }
   
    static public DescriptionBuilderComposite getServiceDescriptionComposite(ServiceDescription svcDesc) {
        DescriptionBuilderComposite returnComposite = null;
        // Need to get the composite off the implementation using the getter method, but it is all
        // packaged protected and not part of the interface.
        try {
            Method getComposite = svcDesc.getClass().getDeclaredMethod("getDescriptionBuilderComposite");
            getComposite.setAccessible(true);
View Full Code Here

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

        }

        return wsdlDefinition;
    }
    static public DescriptionBuilderComposite getServiceDescriptionComposite(ServiceDescription svcDesc) {
        DescriptionBuilderComposite returnComposite = null;
        // Need to get the composite off the implementation using the getter method, but it is all
        // packaged protected and not part of the interface.
        try {
            Method getComposite = svcDesc.getClass().getDeclaredMethod("getDescriptionBuilderComposite");
            getComposite.setAccessible(true);
View Full Code Here

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

        assertNotNull(service);
        ServiceDelegate serviceDelegate = DescriptionTestUtils2.getServiceDelegate(service);
        assertNotNull(serviceDelegate);
        ServiceDescription serviceDesc = serviceDelegate.getServiceDescription();
        assertNotNull(serviceDesc);
        DescriptionBuilderComposite dbcInServiceDesc = DescriptionTestUtils2.getServiceDescriptionComposite(serviceDesc);
        assertNotNull(dbcInServiceDesc);
        assertEquals(Service.class, dbcInServiceDesc.getCorrespondingClass());
        // Since this is a generic Service with no overrides, there will be no WebServiceClient annotation
        WebServiceClient wsClient = dbcInServiceDesc.getWebServiceClientAnnot();
        assertNull(wsClient);

        // WSDL was specified on the create, so make sure the right one was used by checking the ports
        assertTrue("Wrong WSDL used", ClientMetadataTest.validatePort(service, otherWsdl_portLocalPart));
       
View Full Code Here

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

        Service service = Service.create(wsdlUrl, serviceQName);
        ServiceDelegate serviceDelegate = DescriptionTestUtils2.getServiceDelegate(service);
        assertNull(ServiceDelegate.getServiceMetadata());
        ServiceDescription serviceDesc = serviceDelegate.getServiceDescription();

        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
        assertNull(ServiceDelegate.getPortMetadata());
        ServiceDelegate.setPortMetadata(sparseComposite);
        assertNull(ServiceDelegate.getServiceMetadata());
        assertSame(sparseComposite, ServiceDelegate.getPortMetadata());
        QName portQN = new QName(namespaceURI, otherWsdl_portLocalPart);
        ClientMetadataPortSEI port = service.getPort(portQN, ClientMetadataPortSEI.class);
        assertNotNull(port);
        assertNull(ServiceDelegate.getPortMetadata());
       
        EndpointDescription epDescArray[] = serviceDesc.getEndpointDescriptions();
        assertEquals(1, epDescArray.length);
        DescriptionBuilderComposite epDBC = epDescArray[0].getDescriptionBuilderComposite();
        assertNotNull(epDBC);
        assertNotSame(sparseComposite, epDBC);
        assertSame(sparseComposite, epDBC.getSparseComposite(serviceDelegate));
    }
View Full Code Here

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

        ServiceDelegate serviceDelegate = DescriptionTestUtils2.getServiceDelegate(service);
        assertNull(ServiceDelegate.getServiceMetadata());
        ServiceDescription serviceDesc = serviceDelegate.getServiceDescription();

        // Do the first getPort on the first Service
        DescriptionBuilderComposite sparseComposite1 = new DescriptionBuilderComposite();
        assertNull(ServiceDelegate.getPortMetadata());
        ServiceDelegate.setPortMetadata(sparseComposite1);
        assertNull(ServiceDelegate.getServiceMetadata());
        assertSame(sparseComposite1, ServiceDelegate.getPortMetadata());
        QName portQN = new QName(namespaceURI, otherWsdl_portLocalPart);
        ClientMetadataPortSEI port1 = service.getPort(portQN, ClientMetadataPortSEI.class);
        EndpointDescription epDescArray1[] = serviceDesc.getEndpointDescriptions();
        assertEquals(1, epDescArray1.length);
        DescriptionBuilderComposite epDBC1 = epDescArray1[0].getDescriptionBuilderComposite();
        assertNotNull(epDBC1);
        assertNotSame(sparseComposite1, epDBC1);
        assertSame(sparseComposite1, epDBC1.getSparseComposite(serviceDelegate));
       
        // Do a second getPort for the same port on the same service using a different composite
        DescriptionBuilderComposite sparseComposite2 = new DescriptionBuilderComposite();
        assertNull(ServiceDelegate.getPortMetadata());
        ServiceDelegate.setPortMetadata(sparseComposite2);
        assertNull(ServiceDelegate.getServiceMetadata());
        assertSame(sparseComposite2, ServiceDelegate.getPortMetadata());

        ClientMetadataPortSEI port2 = service.getPort(portQN, ClientMetadataPortSEI.class);
        EndpointDescription epDescArray2[] = serviceDesc.getEndpointDescriptions();
        assertEquals(1, epDescArray2.length);
        DescriptionBuilderComposite epDBC2 = epDescArray2[0].getDescriptionBuilderComposite();
        assertNotNull(epDBC2);
        assertNotSame(sparseComposite2, epDBC2);
        assertSame(sparseComposite2, epDBC1.getSparseComposite(serviceDelegate));
        // Verify the previous sparse composite was overwritten for this delegate
        assertNotSame(sparseComposite1, epDBC1.getSparseComposite(serviceDelegate));
View Full Code Here

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

            ServiceDelegate serviceDelegate1 = DescriptionTestUtils2.getServiceDelegate(service1);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc1 = serviceDelegate1.getServiceDescription();
           
            // Do the first getPort on the first Service
            DescriptionBuilderComposite sparseComposite1 = new DescriptionBuilderComposite();
            assertNull(ServiceDelegate.getPortMetadata());
            ServiceDelegate.setPortMetadata(sparseComposite1);
            assertNull(ServiceDelegate.getServiceMetadata());
            assertSame(sparseComposite1, ServiceDelegate.getPortMetadata());
            ClientMetadataPortSEI port1 = service1.getPort(portQN, ClientMetadataPortSEI.class);
            EndpointDescription epDescArray1[] = serviceDesc1.getEndpointDescriptions();
            assertEquals(1, epDescArray1.length);
            DescriptionBuilderComposite epDBC1 = epDescArray1[0].getDescriptionBuilderComposite();
            assertNotNull(epDBC1);
            assertNotSame(sparseComposite1, epDBC1);
            assertSame(sparseComposite1, epDBC1.getSparseComposite(serviceDelegate1));
           
            // Create the second service
            Service service2 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate2 = DescriptionTestUtils2.getServiceDelegate(service2);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc2 = serviceDelegate2.getServiceDescription();

            // Do the getPort on the second Service
            DescriptionBuilderComposite sparseComposite2 = new DescriptionBuilderComposite();
            assertNull(ServiceDelegate.getPortMetadata());
            ServiceDelegate.setPortMetadata(sparseComposite2);
            assertNull(ServiceDelegate.getServiceMetadata());
            assertSame(sparseComposite2, ServiceDelegate.getPortMetadata());
            ClientMetadataPortSEI port2 = service2.getPort(portQN, ClientMetadataPortSEI.class);
            EndpointDescription epDescArray2[] = serviceDesc2.getEndpointDescriptions();
            assertEquals(1, epDescArray2.length);
            DescriptionBuilderComposite epDBC2 = epDescArray2[0].getDescriptionBuilderComposite();
            assertNotNull(epDBC2);
            assertNotSame(sparseComposite2, epDBC2);
           
            // Since we installed a caching configuration factory above, the ServiceDescriptions
            // should match for the two service delegates.  The EndpointDesc and the composite
            // in the EndpointDesc should be the same.  The sparse composite should be unique to
            // each service delegate.
            assertNotSame(serviceDelegate1, serviceDelegate2);
            assertSame(serviceDesc1, serviceDesc2);
            assertSame(epDBC1, epDBC2);
            assertSame(epDescArray1[0], epDescArray2[0]);
            assertNotSame(sparseComposite1, sparseComposite2);
            assertSame(sparseComposite1, epDBC1.getSparseComposite(serviceDelegate1));
            assertSame(sparseComposite2, epDBC2.getSparseComposite(serviceDelegate2));
        } finally {
            ClientMetadataTest.restoreOriginalFactory();
        }
    }
View Full Code Here

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

        ServiceDelegate serviceDelegate = DescriptionTestUtils2.getServiceDelegate(service);
        assertNull(ServiceDelegate.getServiceMetadata());
        ServiceDescription serviceDesc = serviceDelegate.getServiceDescription();

        // Do the first getPort on the first Service
        DescriptionBuilderComposite sparseComposite1 = new DescriptionBuilderComposite();
        ServiceDelegate.setPortMetadata(sparseComposite1);
        assertNull(ServiceDelegate.getServiceMetadata());
        assertSame(sparseComposite1, ServiceDelegate.getPortMetadata());
        ClientMetadataPortSEI port1 = service.getPort(portQN1, ClientMetadataPortSEI.class);
        EndpointDescription epDescArray1[] = serviceDesc.getEndpointDescriptions();
        assertEquals(1, epDescArray1.length);
        DescriptionBuilderComposite epDBC1 = epDescArray1[0].getDescriptionBuilderComposite();
        assertNotNull(epDBC1);
        assertNotSame(sparseComposite1, epDBC1);
        assertSame(sparseComposite1, epDBC1.getSparseComposite(serviceDelegate));
       
        // Do a second getPort for a different port on the same service using a different composite
        DescriptionBuilderComposite sparseComposite2 = new DescriptionBuilderComposite();
        assertNull(ServiceDelegate.getPortMetadata());
        ServiceDelegate.setPortMetadata(sparseComposite2);
        assertNull(ServiceDelegate.getServiceMetadata());
        assertSame(sparseComposite2, ServiceDelegate.getPortMetadata());
        ClientMetadataPortSEI port2 = service.getPort(portQN2, ClientMetadataPortSEI.class);
        EndpointDescription epDescArray2[] = serviceDesc.getEndpointDescriptions();
        assertEquals(2, epDescArray2.length);
        EndpointDescription epdPort1 = serviceDesc.getEndpointDescription(portQN1);
        EndpointDescription epdPort2 = serviceDesc.getEndpointDescription(portQN2);
        assertNotNull(epdPort1);
        assertNotNull(epdPort2);
        assertNotSame(epdPort1, epdPort2);
       
        DescriptionBuilderComposite epDBC2 = epdPort2.getDescriptionBuilderComposite();
        assertNotNull(epDBC2);
       
        assertSame(epDescArray1[0], epdPort1);
        assertNotSame(epDBC1, epDBC2);
       
        assertSame(sparseComposite2, epDBC2.getSparseComposite(serviceDelegate));
        assertNotSame(sparseComposite2, epDBC1.getSparseComposite(serviceDelegate));
       
        assertSame(sparseComposite1, epDBC1.getSparseComposite(serviceDelegate));
        assertNotSame(sparseComposite1, epDBC2.getSparseComposite(serviceDelegate));
    }
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.