ClientRequest request = new ClientRequest(MessagingServiceCallbackRegistrationURL);
request.header("Authorization", "OpenId " + SubscriberOpenIdIdentifier);
request.formParameter("consumer_id", consumerKey);
request.formParameter("consumer_secret", consumerSecret);
request.formParameter("callback_uri", callback);
ClientResponse<?> response = request.post();
response.releaseConnection();
if (HttpResponseCodes.SC_OK != response.getStatus()) {
throw new RuntimeException("Callback Registration failed");
}
}