This project provides the WS client to the registry web services. It implements the GBIF Registry API.
Internally the module uses OpenFeign and Spring Cloud OpenFeign.
Common classes and configuration for clients can be found in the project gbif-common-ws, branch registry-spring-boot-integration.
The registry-ws client can be configured in the following ways:
Example:
// set this to the web service URL. It might be localhost:8080 for local development
String wsUrl = "http://api.gbif.org/v1/";
ClientFactory clientFactory = new ClientFactory(wsUrl);
DatasetServcie datasetClient = clientFactory.newInstance(DatasetClient.class);
This includes authentication functionality.
Make sure you are using right properties wsUrl
, appKey
and secretKey
.
Example:
// set this to the web service URL. It might be localhost:8080 for local development
String wsUrl = "http://api.gbif.org/v1/";
String appKey = "app.key";
String secretKey = "secret-key";
String username = "username";
ClientFactory clientFactory = new ClientFactory(username, wsUrl, appKey, secretKey);
DatasetServcie datasetClient = clientFactory.newInstance(DatasetClient.class);