public void registerMessagingServiceCallback(String consumerKey, String consumerSecret, String callback)
throws Exception
{
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(MessagingServiceCallbackRegistrationURL);
Base64 base64 = new Base64();
String base64Credentials = new String(base64.encode("admin:admin".getBytes()));
method.addRequestHeader(new Header("Authorization", "Basic " + base64Credentials));
method.addParameter("consumer_id", consumerKey);
method.addParameter("consumer_secret", consumerSecret);
method.addParameter("callback_uri", callback);
int status = client.executeMethod(method);