String s2 = getClass().getResource("/META-INF/cxf/cxf-extension-http.xml").toString();
String s3 = getClass().getResource("/META-INF/cxf/cxf-extension-http-jetty.xml").toString();
String s4 = getClass()
.getResource("/org/apache/cxf/transport/http_jetty/spring/beans.xml").toString();
ClassPathXmlApplicationContext ctx = new JaxbClassPathXmlApplicationContext(
new String[] {s1, s2, s3, s4});
ConfigurerImpl cfg = new ConfigurerImpl(ctx);
ServiceInfo serviceInfo = new ServiceInfo();
serviceInfo.setName(new QName("bla", "Service"));
EndpointInfo info = new EndpointInfo(serviceInfo, "");
info.setName(new QName("urn:test:ns", "Foo"));
info.setAddress("http://localhost:9000");
Bus bus = (Bus) ctx.getBean("cxf");
bus.setExtension(cfg, Configurer.class);
DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
Destination d =
dfm.getDestinationFactory("http://schemas.xmlsoap.org/soap/http").getDestination(info);