Examples of ServiceDelegate


Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

            ClientMetadataTest.installCachingFactory();
            QName svcQN = new QName(namespaceURI, svcLocalPart);
           
            Service svc1 = Service.create(svcQN);
            assertNotNull(svc1);
            ServiceDelegate svcDlg1 = DescriptionTestUtils2.getServiceDelegate(svc1);
            assertNotNull(svcDlg1);
            ServiceDescription svcDesc1 = svcDlg1.getServiceDescription();
            assertNotNull(svcDesc1);

            // Set the property to revert the behavior.  Note that although we are passing ni
            // a particular service, the property is set on the AxisConfig shared by all
            // services.
            setAxisConfigParameter(svc1, MDQConstants.SHARE_DYNAMIC_PORTS_ACROSS_SERVICES, "true");

            Service svc2 = Service.create(svcQN);
            assertNotNull(svc2);
            ServiceDelegate svcDlg2 = DescriptionTestUtils2.getServiceDelegate(svc2);
            assertNotNull(svcDlg2);
            ServiceDescription svcDesc2 = svcDlg2.getServiceDescription();
            assertNotNull(svcDesc2);
           
            assertNotSame("Service instances should not be the same", svc1, svc2);
            assertNotSame("Service delegates should not be the same", svcDlg1, svcDlg2);
            assertSame("Instance of ServiceDescription should be the same", svcDesc1, svcDesc2);
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

            ClientMetadataTest.installCachingFactory();
            QName svcQN = new QName(namespaceURI, svcLocalPart);
           
            Service svc1 = Service.create(svcQN);
            assertNotNull(svc1);
            ServiceDelegate svcDlg1 = DescriptionTestUtils2.getServiceDelegate(svc1);
            assertNotNull(svcDlg1);
            ServiceDescription svcDesc1 = svcDlg1.getServiceDescription();
            assertNotNull(svcDesc1);

            // Set the property to revert the behavior.  Note that although we are passing ni
            // a particular service, the property is set on the AxisConfig shared by all
            // services.
            setAxisConfigParameter(svc1, MDQConstants.SHARE_DYNAMIC_PORTS_ACROSS_SERVICES, "true");

            QName svcQN2 = new QName(namespaceURI, svcLocalPart + "2");
            Service svc2 = Service.create(svcQN2);
            assertNotNull(svc2);
            ServiceDelegate svcDlg2 = DescriptionTestUtils2.getServiceDelegate(svc2);
            assertNotNull(svcDlg2);
            ServiceDescription svcDesc2 = svcDlg2.getServiceDescription();
            assertNotNull(svcDesc2);
           
            assertNotSame("Service instances should not be the same", svc1, svc2);
            assertNotSame("Service delegates should not be the same", svcDlg1, svcDlg2);
            assertNotSame("Instance of ServiceDescription should be the same", svcDesc1, svcDesc2);
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

            ClientMetadataTest.installCachingFactory();
            QName svcQN = new QName(namespaceURI, svcLocalPart);
           
            Service svc1 = Service.create(svcQN);
            assertNotNull(svc1);
            ServiceDelegate svcDlg1 = DescriptionTestUtils2.getServiceDelegate(svc1);
            assertNotNull(svcDlg1);
            ServiceDescription svcDesc1 = svcDlg1.getServiceDescription();
            assertNotNull(svcDesc1);

            Service svc2 = Service.create(svcQN);
            assertNotNull(svc2);
            ServiceDelegate svcDlg2 = DescriptionTestUtils2.getServiceDelegate(svc2);
            assertNotNull(svcDlg2);
            ServiceDescription svcDesc2 = svcDlg2.getServiceDescription();
            assertNotNull(svcDesc2);
           
            assertNotSame("Service instances should not be the same", svc1, svc2);
            assertNotSame("Service delegates should not be the same", svcDlg1, svcDlg2);
            assertSame("Instance of ServiceDescription should be the same", svcDesc1, svcDesc2);
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

            ClientMetadataTest.installCachingFactory();
            QName svcQN = new QName(namespaceURI, svcLocalPart);
           
            Service svc1 = Service.create(svcQN);
            assertNotNull(svc1);
            ServiceDelegate svcDlg1 = DescriptionTestUtils2.getServiceDelegate(svc1);
            assertNotNull(svcDlg1);
            ServiceDescription svcDesc1 = svcDlg1.getServiceDescription();
            assertNotNull(svcDesc1);

            // Add a port to service, save off the metadata to validate later
            svc1.addPort(new QName(namespaceURI, dynamicPort1),
                         bindingID1,
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

        try {
            ClientMetadataTest.installCachingFactory();
            QName svcQN = new QName(namespaceURI, svcLocalPart);
            Service svc1 = Service.create(svcQN);
            assertNotNull(svc1);
            ServiceDelegate svcDlg1 = DescriptionTestUtils2.getServiceDelegate(svc1);
            assertNotNull(svcDlg1);
            ServiceDescription svcDesc1 = svcDlg1.getServiceDescription();
            assertNotNull(svcDesc1);

            QName svcQN2 = new QName(namespaceURI, svcLocalPart + "2");
            Service svc2 = Service.create(svcQN2);
            assertNotNull(svc2);
            ServiceDelegate svcDlg2 = DescriptionTestUtils2.getServiceDelegate(svc2);
            assertNotNull(svcDlg2);
            ServiceDescription svcDesc2 = svcDlg2.getServiceDescription();
            assertNotNull(svcDesc2);
           
            assertNotSame("Service instances should not be the same", svc1, svc2);
            assertNotSame("Service delegates should not be the same", svcDlg1, svcDlg2);
            assertNotSame("Instance of ServiceDescription should not be the same", svcDesc1, svcDesc2);
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

        }
        return returnList;
    }
   
    private void setAxisConfigParameter(Service service, String key, String value) {
        ServiceDelegate delegate = DescriptionTestUtils2.getServiceDelegate(service);
        ServiceDescription svcDesc = delegate.getServiceDescription();
        AxisConfiguration axisConfig = svcDesc.getAxisConfigContext().getAxisConfiguration();
        Parameter parameter = new Parameter(key, value);
        try {
            axisConfig.addParameter(parameter);
        } catch (AxisFault e) {
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

    // instance.  The spy will allow an parameter to be set on the AxisConfig in order to unit test
    // the property.  This is NOT the way properties should be set on the config outside of a unit test
    // environment.  The correct way to set properties on the config is to specify them in the associated
    // axis2.xml file.
    static private void setAxisConfigParameter(Service service, String key, String value) {
        ServiceDelegate delegate = getServiceDelegate(service);
        ServiceDescription svcDesc = delegate.getServiceDescription();
        AxisConfiguration axisConfig = svcDesc.getAxisConfigContext().getAxisConfiguration();
        Parameter parameter = new Parameter(key, value);
        try {
            axisConfig.addParameter(parameter);
        } catch (AxisFault e) {
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

            fail("Unable to set Parameter on AxisConfig due to exception " + e);
        }
    }
    static private ServiceDelegate getServiceDelegate(Service service) {
        // Need to get to the private Service._delegate field in order to get to the ServiceDescription to test
        ServiceDelegate returnServiceDelegate = null;
        try {
            try {
//                Field serviceDelgateField = service.getClass().getDeclaredFields()[0];
                Field serviceDelgateField = service.getClass().getDeclaredField("delegate");
                serviceDelgateField.setAccessible(true);
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

        URL wsdlURL = DescriptionTestUtils2.getWSDLURL("WSDLMultiTests.wsdl");

        QName service1QN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_1);
        Service service1 = Service.create(wsdlURL, service1QN);
        assertNotNull(service1);
        ServiceDelegate service1Delegate = DescriptionTestUtils2.getServiceDelegate(service1);
        assertNotNull (service1Delegate);
        ServiceDescription service1Desc = service1Delegate.getServiceDescription();
        assertNotNull(service1Desc);
        List<QName> service1PortsList = service1Desc.getPorts();
        assertNotNull(service1PortsList);
        assertEquals(3, service1PortsList.size());
        Iterator<QName> service1PortIterator = service1.getPorts();
        assertQNameIteratorSameAsList(service1PortIterator, service1PortsList);

        QName service2QN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_2);
        Service service2 = Service.create(wsdlURL, service2QN);
        assertNotNull(service2);
        ServiceDelegate service2Delegate = DescriptionTestUtils2.getServiceDelegate(service2);
        assertNotNull (service2Delegate);
        ServiceDescription service2Desc = service2Delegate.getServiceDescription();
        assertNotNull(service2Desc);
        List<QName> service2PortsList = service2Desc.getPorts();
        assertNotNull(service2PortsList);
        assertEquals(4, service2PortsList.size());
        Iterator<QName> service2PortIterator = service2.getPorts();
View Full Code Here

Examples of org.apache.axis2.jaxws.spi.ServiceDelegate

        URL wsdlURL = DescriptionTestUtils2.getWSDLURL("WSDLMultiTests.wsdl");

        QName service1QN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_1);
        Service service1 = Service.create(wsdlURL, service1QN);
        assertNotNull(service1);
        ServiceDelegate service1Delegate = DescriptionTestUtils2.getServiceDelegate(service1);
        assertNotNull (service1Delegate);
        ServiceDescription service1Desc = service1Delegate.getServiceDescription();
        assertNotNull(service1Desc);
        List<QName> service1PortsList = service1Desc.getPorts();
        assertNotNull(service1PortsList);
        assertEquals(3, service1PortsList.size());
        service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P1"), null, null);
        service1.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS1P2"), null, null);
        service1PortsList = service1Desc.getPorts();
        assertEquals(5, service1PortsList.size());
        Iterator<QName> service1PortIterator = service1.getPorts();
        assertQNameIteratorSameAsList(service1PortIterator, service1PortsList);

        QName service2QN = new QName(VALID_SERVICE_NAMESPACE, VALID_SERVICE_LOCALPART_2);
        Service service2 = Service.create(wsdlURL, service2QN);
        assertNotNull(service2);
        ServiceDelegate service2Delegate = DescriptionTestUtils2.getServiceDelegate(service2);
        assertNotNull (service2Delegate);
        ServiceDescription service2Desc = service2Delegate.getServiceDescription();
        assertNotNull(service2Desc);
        List<QName> service2PortsList = service2Desc.getPorts();
        assertNotNull(service2PortsList);
        assertEquals(4, service2PortsList.size());
        service2.addPort(new QName(VALID_SERVICE_NAMESPACE, "addedPortS2P1"), null, null);
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.