Message CreateTextMessage(string message)
{
Message result = Message.CreateMessage(MessageVersion.None, null, new TextBodyWriter(message));
result.Properties[WebBodyFormatMessageProperty.Name] = new WebBodyFormatMessageProperty(WebContentFormat.Raw);
WebOperationContext.Current.OutgoingResponse.ContentType = "text/plain";
return result;
}