// SendMessage
if (request.getOriginalRequest() instanceof SendMessageRequest
&& response instanceof SendMessageResult) {
if (log.isDebugEnabled())
log.debug("Checking the MD5 digest returned in SendMessageResult.");
SendMessageRequest sendMessageRequest = (SendMessageRequest)request.getOriginalRequest();
SendMessageResult sendMessageResult = (SendMessageResult)response;
String messageSent = sendMessageRequest.getMessageBody();
String md5Returned = sendMessageResult.getMD5OfMessageBody();
if ( !checkMessageMd5(messageSent, md5Returned) )
throw new AmazonClientException("MD5 returned by SQS does not match the calculation on the original request.(Message body: \""
+ messageSent + "\", MD5 returned: \"" + md5Returned + "\")");
}