RESTEasy (a JAX-RS implementation) has a nice client framework, eg:
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
SimpleClient client = Proxy
Even easier:
ResteasyClient client = new ResteasyClientBuilder().build();
ResteasyWebTarget target = client.target("https://test.com");
Response response = target.request().header("Authorization", "Basic test123")
.acceptEncoding("gzip, deflate")
.post(Entity.entity(some_xml, "application/x-www-form-urlencoded"));