Package org.apache.cxf.dosgi.dsw.service

Examples of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl


        BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
        EasyMock.replay(bc);
       
        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface");
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here


       
        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.EXPORTED_CONFIGS, Constants.RS_CONFIG_TYPE);
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof JaxRSPojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.EXPORTED_CONFIGS, Constants.RS_CONFIG_TYPE);
        props.put(Constants.EXPORTED_INTENTS, "HTTP");
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof JaxRSPojoConfigurationTypeHandler);       
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
    }
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.EXPORTED_CONFIGS, Constants.RS_CONFIG_TYPE);
        props.put(Constants.EXPORTED_INTENTS, "SOAP HTTP");
       
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl("MyInterface", props);
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);
        assertTrue(!(handler instanceof JaxRSPojoConfigurationTypeHandler));
        assertSame(dp, ((PojoConfigurationTypeHandler) handler).getDistributionProvider());
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.WS_CONFIG_TYPE);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);

        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        // use default for this: sdProps.put(Constants.CONFIG_TYPE_PROPERTY, Constants.POJO_CONFIG_TYPE);
        sdProps.put(Constants.WS_ADDRESS_PROPERTY, "http://localhost:9876/abcd");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);

        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof PojoConfigurationTypeHandler);       
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.WS_CONFIG_TYPE);
        sdProps.put(Constants.WS_HTTP_SERVICE_CONTEXT, "/abc");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof HttpServiceConfigurationTypeHandler);
View Full Code Here

        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", Constants.WSDL_CONFIG_TYPE);
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        CxfDistributionProvider dp = new DistributionProviderImpl(bc);
        ConfigurationTypeHandler handler = f.getHandler(bc, sd, dp, new HashMap<String, Object>());
        assertTrue(handler instanceof WsdlConfigurationTypeHandler);       
View Full Code Here

       
        ConfigTypeHandlerFactory f = ConfigTypeHandlerFactory.getInstance();
       
        Map<String, Object> sdProps = new HashMap<String, Object>();
        sdProps.put("osgi.remote.configuration.type", "foobar");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(
                Collections.singletonList("MyInterface"), sdProps);
       
        assertNull("Should not get a handler as this an unsupported config type",
                f.getHandler(bc, sd, null, new HashMap<String, Object>()));       
    }
View Full Code Here

        EasyMock.replay(sr);
        EasyMock.replay(callingContext);
       
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.WS_ADDRESS_PROPERTY, "http://alternate_host:80/myString");
        ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        p.createServer(sr, dswContext, callingContext, sd, String.class, myService);
        assertEquals(1, dp.getExposedServices().size());
        assertSame(sr, dp.getExposedServices().iterator().next());
View Full Code Here

TOP

Related Classes of org.apache.cxf.dosgi.dsw.service.ServiceEndpointDescriptionImpl

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.