Search in sources :

Example 1 with ArchivaAdministrationService

use of org.apache.archiva.rest.api.services.ArchivaAdministrationService in project archiva by apache.

the class AbstractArchivaRestTest method getArchivaAdministrationService.

protected ArchivaAdministrationService getArchivaAdministrationService() {
    ArchivaAdministrationService service = JAXRSClientFactory.create(getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/", ArchivaAdministrationService.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;
}
Also used : JacksonJaxbJsonProvider(com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider) ArchivaAdministrationService(org.apache.archiva.rest.api.services.ArchivaAdministrationService)

Aggregations

JacksonJaxbJsonProvider (com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider)1 ArchivaAdministrationService (org.apache.archiva.rest.api.services.ArchivaAdministrationService)1