I have an ASP.NET MVC4 website implementing a REST API, which I\'m consuming from a client application. My ApiController methods take and return complex objects, as XML.
I've had some issues with the AddBody calls not properly serializing JSON values, so there might be some similarity to your problem. Instead of AddBody, you could try:
request.AddParameter("text/xml", xmlAsString, ParameterType.RequestBody);
If that works, you could look to see about changing the second parameter to be the xml object and see if the serializer does what you want.
The other option could be the XmlMediaTypeFormatter.ReadFromStreamAsync
isn't properly picking up a proper serializer; you could try overriding that function.