Client client = ClientBuilder.newClient();
client.register(JacksonJaxbJsonProvider.class);
// set basic auth filter
HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic("foo", "bar");
client.register(feature);
UriBuilder uri = UriBuilder.fromUri(BASE_URI);
WebTarget target = client.target(uri.path("message").build());