JAXRSClientFactory.create( getBaseUrl() + "/" + getRestServicesPath() + "/archivaServices/",
SearchService.class,
Collections.singletonList( new JacksonJaxbJsonProvider() ) );
-
+ // to add authentification
if ( authzHeader != null )
{
WebClient.client( service ).header( "Authorization", authzHeader );
}
+ // to configure read timeout
WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 100000000 );
+ // if you want to use json as exchange format xml is supported too
WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
return service;
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
+ <!-- START SNIPPET: rest-dependencies -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</exclusion>
</exclusions>
</dependency>
-
+ <!-- END SNIPPET: rest-dependencies -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>