ep.put(ProviderFactory.class.getName(), factory);
return factory;
}
protected void setDataBindingProvider(ProviderFactory factory, Service s) {
DataBinding db = getDataBinding();
if (db instanceof PropertiesAwareDataBinding) {
Map<Class<?>, Type> allClasses = ResourceUtils.getAllRequestResponseTypes(
serviceFactory.getRealClassResourceInfo(), false);
Map<String, Object> props = new HashMap<String, Object>();
props.put(PropertiesAwareDataBinding.TYPES_PROPERTY, allClasses);
((PropertiesAwareDataBinding)db).initialize(props);
} else {
if (s instanceof JAXRSServiceImpl) {
((JAXRSServiceImpl)s).setCreateServiceModel(true);
}
db.initialize(s);
}
factory.setUserProviders(Collections.singletonList(new DataBindingProvider(db)));
}