use of com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider in project archiva by apache.
the class AbstractArchivaRestTest method getNetworkProxyService.
protected NetworkProxyService getNetworkProxyService() {
NetworkProxyService service = JAXRSClientFactory.create(getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", NetworkProxyService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
WebClient.client(service).header("Authorization", authorizationHeader);
WebClient.client(service).header("Referer", "http://localhost:" + port);
WebClient.getConfig(service).getHttpConduit().getClient().setReceiveTimeout(300000);
WebClient.client(service).accept(MediaType.APPLICATION_JSON_TYPE);
WebClient.client(service).type(MediaType.APPLICATION_JSON_TYPE);
return service;
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider in project archiva by apache.
the class AbstractArchivaRestTest method getRedbackRuntimeConfigurationService.
protected RedbackRuntimeConfigurationService getRedbackRuntimeConfigurationService() {
RedbackRuntimeConfigurationService service = JAXRSClientFactory.create(getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", RedbackRuntimeConfigurationService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
WebClient.client(service).accept(MediaType.APPLICATION_JSON_TYPE);
WebClient.client(service).type(MediaType.APPLICATION_JSON_TYPE);
WebClient.client(service).header("Authorization", authorizationHeader);
WebClient.client(service).header("Referer", "http://localhost:" + port);
WebClient.getConfig(service).getHttpConduit().getClient().setReceiveTimeout(300000);
return service;
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider in project archiva by apache.
the class RuntimeInfoServiceTest method runtimeInfoService.
@Test
public void runtimeInfoService() throws Exception {
RuntimeInfoService service = JAXRSClientFactory.create(getBaseUrl() + "/" + getRestServicesPath() + "/archivaUiServices/", RuntimeInfoService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
WebClient.client(service).header("Referer", "http://localhost");
ApplicationRuntimeInfo applicationRuntimeInfo = service.getApplicationRuntimeInfo("en");
assertEquals(System.getProperty("expectedVersion"), applicationRuntimeInfo.getVersion());
assertFalse(applicationRuntimeInfo.isJavascriptLog());
assertTrue(applicationRuntimeInfo.isLogMissingI18n());
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider in project archiva by apache.
the class AbstractDownloadTest method getRepositoriesService.
protected RepositoriesService getRepositoriesService() {
RepositoriesService service = JAXRSClientFactory.create(getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", RepositoriesService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
WebClient.client(service).header("Authorization", authorizationHeader);
WebClient.client(service).header("Referer", "http://localhost:" + port);
WebClient.getConfig(service).getHttpConduit().getClient().setReceiveTimeout(300000L);
return service;
}
use of com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider in project archiva by apache.
the class AbstractDownloadTest method getRoleManagementService.
protected RoleManagementService getRoleManagementService(String authzHeader) {
RoleManagementService service = JAXRSClientFactory.create("http://localhost:" + port + "/" + getRestServicesPath() + "/redbackServices/", RoleManagementService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
WebClient.client(service).header("Referer", "http://localhost:" + port);
// for debuging purpose
WebClient.getConfig(service).getHttpConduit().getClient().setReceiveTimeout(3000000L);
if (authzHeader != null) {
WebClient.client(service).header("Authorization", authzHeader);
}
return service;
}
Aggregations