Examples of ExportRegistrationImpl


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

        EasyMock.replay(callingContext);
       
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.WS_ADDRESS_PROPERTY, "http://alternate_host:80/myString");
       
        ExportRegistrationImpl exReg = new ExportRegistrationImpl(sr,null,null);
       
        p.createServer(exReg, dswContext, callingContext, props, String.class, myService);
       
       
        Map edProps = exReg.getEndpointDescription().getProperties();

        assertNotNull(edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS));
        assertEquals(1, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS)).length);
        assertEquals(Constants.WS_CONFIG_TYPE, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS))[0]);
        assertEquals("http://alternate_host:80/myString", edProps.get(RemoteConstants.ENDPOINT_ID));
View Full Code Here

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

        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.WS_HTTP_SERVICE_CONTEXT, "/myRunnable");
        //ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        ExportRegistrationImpl exReg = new ExportRegistrationImpl(sr,null,null);
       
        //        assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        assertEquals("Precondition failed", "", sfb.getAddress());
        h.createServer(exReg, dswContext, callingContext, props, Runnable.class, myService);
        assertEquals("The address should be set to '/'. The Servlet context dictates the actual location.", "/", sfb.getAddress());
        //assertEquals(1, dp.getExposedServices().size());
        //assertSame(sr, dp.getExposedServices().iterator().next());
       
        String hostName;
        try {
            hostName = AbstractConfigurationHandler.getLocalHost().getHostAddress();
        } catch (Exception e) {
            hostName = "localhost";
        }
       
        Map edProps = exReg.getEndpointDescription().getProperties();
       
        assertNotNull(edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS));
        assertEquals(1, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS)).length);
        assertEquals(Constants.WS_CONFIG_TYPE, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS))[0]);
        assertEquals("http://" + hostName + ":1327/myRunnable", edProps.get(RemoteConstants.ENDPOINT_ID));
View Full Code Here

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

        EasyMock.replay(callingContext);

        Map<String, Object> props = new HashMap<String, Object>();
        //ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        ExportRegistrationImpl exReg = new ExportRegistrationImpl(sr,null,null);
       
        //assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        h.createServer(exReg, dswContext, callingContext, props, Runnable.class, myService);
        //assertEquals(1, dp.getExposedServices().size());
        //assertSame(sr, dp.getExposedServices().iterator().next());
       
        String hostname;
        try {
            hostname = AbstractConfigurationHandler.getLocalHost().getHostAddress();
        } catch (Exception e) {
            hostname = "localhost";
        }
       
        Map edProps = exReg.getEndpointDescription().getProperties();
       
        assertNotNull(edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS));
        assertEquals(1, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS)).length);
        assertEquals(Constants.WS_CONFIG_TYPE, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS))[0]);
        assertEquals("http://" + hostname + ":8080/java/lang/Runnable", edProps.get(RemoteConstants.ENDPOINT_ID));
View Full Code Here

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

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("osgi.remote.configuration.type", Constants.WS_CONFIG_TYPE);
        props.put(Constants.WS_HTTP_SERVICE_CONTEXT, "/myRunnable");
        //ServiceEndpointDescription sd = new ServiceEndpointDescriptionImpl(Runnable.class.getName(), props);
       
        ExportRegistrationImpl exReg = new ExportRegistrationImpl(sr,null,null);
       
        //assertEquals("Precondition failed", 0, dp.getExposedServices().size());
        h.createServer(exReg, dswContext, callingContext, props, Runnable.class, myService);
        //assertEquals(1, dp.getExposedServices().size());
        //assertSame(sr, dp.getExposedServices().iterator().next());
       
        String hostName;
        try {
            hostName = AbstractConfigurationHandler.getLocalHost().getHostAddress();
        } catch (Exception e) {
            hostName = "localhost";
        }
        Map edProps = exReg.getEndpointDescription().getProperties();
       
        assertNotNull(edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS));
        assertEquals(1, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS)).length);
        assertEquals(Constants.WS_CONFIG_TYPE, ((String[])edProps.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS))[0]);
        assertEquals("https://" + hostName + ":8432/myRunnable", edProps.get(RemoteConstants.ENDPOINT_ID));
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.