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));