Package org.apache.axis2.jaxws.description

Examples of org.apache.axis2.jaxws.description.ServiceDescription


        assertNotNull(service);
        assertNull(ServiceDelegate.getServiceMetadata());
       
        ServiceDelegate serviceDelegate = DescriptionTestUtils2.getServiceDelegate(service);
        assertNotNull(serviceDelegate);
        ServiceDescription serviceDesc = serviceDelegate.getServiceDescription();
        assertNotNull(serviceDesc);
        DescriptionBuilderComposite dbcInServiceDesc = DescriptionTestUtils2.getServiceDescriptionComposite(serviceDesc);
        assertSame(composite, dbcInServiceDesc.getSparseComposite(serviceDelegate));
        assertEquals(ClientMetadataGeneratedService.class, dbcInServiceDesc.getCorrespondingClass());
View Full Code Here


        assertNotNull(service);
        assertNull(ServiceDelegate.getServiceMetadata());
       
        ServiceDelegate serviceDelegate = DescriptionTestUtils2.getServiceDelegate(service);
        assertNotNull(serviceDelegate);
        ServiceDescription serviceDesc = serviceDelegate.getServiceDescription();
        assertNotNull(serviceDesc);
        DescriptionBuilderComposite dbcInServiceDesc = DescriptionTestUtils2.getServiceDescriptionComposite(serviceDesc);
        assertSame(composite, dbcInServiceDesc.getSparseComposite(serviceDelegate));
        assertEquals(ClientMetadataGeneratedService.class, dbcInServiceDesc.getCorrespondingClass());
        // There is WebServiceClient on the generated Service and it was overriden in the composite
View Full Code Here

            // Create the first service
            Service service1 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate1 = DescriptionTestUtils2.getServiceDelegate(service1);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc1 = serviceDelegate1.getServiceDescription();
            validatePort(service1, otherWsdl_portLocalPart);
           
            // Create the second service
            Service service2 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate2 = DescriptionTestUtils2.getServiceDelegate(service2);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc2 = serviceDelegate2.getServiceDescription();
            validatePort(service2, otherWsdl_portLocalPart);
           
            assertNotSame(serviceDelegate1, serviceDelegate2);
            // Since we installed a caching factory, the service descriptions WILL be cached.
            // Without that factory, they would not have been cached.  The reason is that the
            // AxisConfiguration instance is part of the key.  The default factory in this
            // environment always returns a new instance.  The test factory does not.
            assertSame(serviceDesc1, serviceDesc2);
        } finally {
            restoreOriginalFactory();
        }
       
        // Sanity check that the factory WAS restored.  Do the same thing as above, but this time
        // the service descs should NOT be the same since they weren't cached.
        QName serviceQName = new QName(namespaceURI, svcLocalPart);
        QName portQN = new QName(namespaceURI, otherWsdl_portLocalPart);
        URL wsdlUrl = ClientMetadataTest.getWsdlURL(otherWsdl);

        // Create the first service
        Service service1 = Service.create(wsdlUrl, serviceQName);
        ServiceDelegate serviceDelegate1 = DescriptionTestUtils2.getServiceDelegate(service1);
        assertNull(ServiceDelegate.getServiceMetadata());
        ServiceDescription serviceDesc1 = serviceDelegate1.getServiceDescription();
        validatePort(service1, otherWsdl_portLocalPart);
       
        // Create the second service
        Service service2 = Service.create(wsdlUrl, serviceQName);
        ServiceDelegate serviceDelegate2 = DescriptionTestUtils2.getServiceDelegate(service2);
        assertNull(ServiceDelegate.getServiceMetadata());
        ServiceDescription serviceDesc2 = serviceDelegate2.getServiceDescription();
        validatePort(service2, otherWsdl_portLocalPart);
       
        assertNotSame(serviceDelegate1, serviceDelegate2);
        assertNotSame("Client Configuration factory NOT restored; subsequent tests may be affected!", serviceDesc1, serviceDesc2);
    }
View Full Code Here

           
            // Create the first service
            Service service1 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate1 = DescriptionTestUtils2.getServiceDelegate(service1);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc1 = serviceDelegate1.getServiceDescription();
            validatePort(service1, otherWsdl_portLocalPart);

            // Create the second service specifiying a sparse composite
            DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
            ServiceDelegate.setServiceMetadata(sparseComposite);
            Service service2 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate2 = DescriptionTestUtils2.getServiceDelegate(service2);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc2 = serviceDelegate2.getServiceDescription();
            validatePort(service2, otherWsdl_portLocalPart);
           
            assertNotSame(serviceDelegate1, serviceDelegate2);
            // Since we installed a caching factory, the service descriptions WILL be cached.
            // Without that factory, they would not have been cached.  The reason is that the
View Full Code Here

            DescriptionBuilderComposite sparseComposite1 = new DescriptionBuilderComposite();
            ServiceDelegate.setServiceMetadata(sparseComposite1);
            Service service1 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate1 = DescriptionTestUtils2.getServiceDelegate(service1);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc1 = serviceDelegate1.getServiceDescription();
            validatePort(service1, otherWsdl_portLocalPart);

            // Create the second service specifiying a sparse composite
            DescriptionBuilderComposite sparseComposite2 = new DescriptionBuilderComposite();
            ServiceDelegate.setServiceMetadata(sparseComposite2);
            Service service2 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate2 = DescriptionTestUtils2.getServiceDelegate(service2);
            assertNull(ServiceDelegate.getServiceMetadata());
            ServiceDescription serviceDesc2 = serviceDelegate2.getServiceDescription();
            validatePort(service2, otherWsdl_portLocalPart);
           
            assertNotSame(serviceDelegate1, serviceDelegate2);
            // Since we installed a caching factory, the service descriptions WILL be cached.
            // Without that factory, they would not have been cached.  The reason is that the
View Full Code Here

           
            // Verifiy the service delegates are different and the service descriptions are the same
            // since we installed a caching factory above.
            ServiceDelegate serviceDelegate1 = DescriptionTestUtils2.getServiceDelegate(service1);
            assertNotNull(serviceDelegate1);
            ServiceDescription serviceDesc1 = serviceDelegate1.getServiceDescription();
            assertNotNull(serviceDesc1);
           
            ServiceDelegate serviceDelegate2 = DescriptionTestUtils2.getServiceDelegate(service2);
            assertNotNull(serviceDelegate2);
            ServiceDescription serviceDesc2 = serviceDelegate2.getServiceDescription();
            assertNotNull(serviceDesc2);
           
            assertNotSame(serviceDelegate1, serviceDelegate2);
            assertSame(serviceDesc1, serviceDesc2);
View Full Code Here

        soapMessageContext.putAll(jaxwsMessageContext.getProperties());

        EndpointDescription description = jaxwsMessageContext.getEndpointDescription();
        if (description !=null) {
            // Set the WSDL properties
            ServiceDescription sd =
                    description.getServiceDescription();
            if (sd != null) {
                String wsdlLocation = ((ServiceDescriptionWSDL)sd).getWSDLLocation();
                if (wsdlLocation != null && !"".equals(wsdlLocation)) {
                    URI wsdlLocationURI = null;
View Full Code Here

    /**
     * Test that the HandlerResolverImpl returns the correct roles defined in the handler config
     * file <soap-role> elements.
     */
    public void testHandlerResolverGetRoles() {
        ServiceDescription serviceDesc = DescriptionFactory.createServiceDescription(RoleBasedMUServiceImpl.class);
        HandlerResolverImpl handlerResolver = new HandlerResolverImpl(serviceDesc);
       
        EndpointDescription epDesc = serviceDesc.getEndpointDescriptions()[0];
       
        // Make sure the role information is specified in the handler config file
        HandlerChainsType epHandlerChains = epDesc.getHandlerChain();
        assertNotNull(epHandlerChains);
        List<HandlerChainType> epHandlerChain = epHandlerChains.getHandlerChain();
View Full Code Here

   
    /**
     * Test that multiple <soap-role> elements in the handler config file work correctly.
     */
    public void testHandlerResolverGerRoles2() {
        ServiceDescription serviceDesc = DescriptionFactory.createServiceDescription(RoleBasedMUServiceImpl2.class);
        HandlerResolverImpl handlerResolver = new HandlerResolverImpl(serviceDesc);
        EndpointDescription epDesc = serviceDesc.getEndpointDescriptions()[0];
       
        // Make sure the role information is specified in the handler config file
        HandlerChainsType epHandlerChains = epDesc.getHandlerChain();
        assertNotNull(epHandlerChains);
        List<HandlerChainType> epHandlerChain = epHandlerChains.getHandlerChain();
View Full Code Here

    public void setMessageReceiver(MessageReceiver messageReceiver) {
        this.messageReceiver = messageReceiver;
    }
  
    public AxisService getServiceFromClass(Class endpointClass) throws Exception {
        ServiceDescription serviceDescription =
            DescriptionFactory.createServiceDescription(endpointClass);       
        EndpointDescription[] edArray = serviceDescription.getEndpointDescriptions();
        AxisService service = edArray[0].getAxisService();
               
        if (service.getNameSpacesMap() == null) {
            NamespaceMap map = new NamespaceMap();
            map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.description.ServiceDescription

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.