JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
sf.setServiceClass(CustomerService.class);
// Use the HTTP Binding which understands the Java Rest Annotations
sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
sf.setAddress("http://localhost:8080/json");
sf.getServiceFactory().setInvoker(new BeanInvoker(serviceObj));
// Turn the "wrapped" style off. This means that CXF won't generate
// wrapper JSON elements and we'll have prettier JSON text. This
// means that we need to stick to one request and one response
// parameter though.