public override void BeforeMarshall(OpenWireFormat wireFormat)
{
if (body == null)
{
Content = null;
}
else
{
MemoryStream stream = new MemoryStream();
Formatter.Serialize(stream, body);
Content = stream.ToArray();
}
//Console.WriteLine("BeforeMarshalling, content is: " + Content);
base.BeforeMarshall(wireFormat);
}