{
try {
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(MessagingServiceMessagesURL);
Base64 base64 = new Base64();
String base64Credentials = new String(base64.encode("admin:admin".getBytes()));
method.addRequestHeader(new Header("Authorization", "Basic " + base64Credentials));
method.setRequestEntity(new StringRequestEntity("Hello2 !", "text/plain", "UTF-8"));
int status = client.executeMethod(method);
if (HttpResponseCodes.SC_OK != status) {
throw new RuntimeException("Messages can not be sent");