ProviderFactory factory = setupFactory(ep);
ep.put(Application.class.getName(), appProvider);
factory.setApplicationProvider(appProvider);
factory.setRequestPreprocessor(
new RequestPreprocessor(languageMappings, extensionMappings));
ep.put(Bus.class.getName(), getBus());
if (documentLocation != null) {
ep.put(JAXRSUtils.DOC_LOCATION, documentLocation);
}
if (rc != null) {