Googling a bit more i've found this:
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setResourceClasses(CustomerService.class);
sf.setAddress("http://localhost:9000/");
sf.create();
A couple of things to note:
The JAXRSServerFactoryBean creates a Server inside CXF which starts
listening for requests on the URL specified.
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
CustomerService cs = new CustomerService();
sf.setServiceBeans(cs);
sf.setAddress("http://localhost:9080/");
sf.create();
--
View this message in context:
http://cxf.547215.n5.nabble.com/Programatically-publishing-a-RESTful-service-tp5739401p5739411.html
Sent from the cxf-user mailing list archive at Nabble.com.