Surprisingly, int and string do not have a MediaTypeFormatter by default, so it doesn't know how to handle those types.
The only types it knows how to handle out of the box are JSON, XML, and form url-encoded data. This quote is from the official asp.net website, http://www.asp.net/web-api/overview/formats-and-model-binding/media-formatters
In Web API, the media type determines how Web API serializes and
deserializes the HTTP message body. There is built-in support for XML,
JSON, and form-urlencoded data, and you can support additional media
types by writing a media formatter.
Now you 'can' write your own MediaTypeFormatter (the link I provided will show you how), but since the asp.net web api is still in beta I have had a lot of trouble with it using custom formatters for simple types like strings. I found it is much easier just to wrap whatever value you would like to PUT in xml / json and it will automatically get deserialized. See my post here for more info on that, When HTTP-POST has body, url parameter is null
For your specific example your PUT body would look like,
<message>
<id>6</id>
</message>
Then be sure to set the content-type of your http request to text/xml (or application/json if you choose to use that). And it should serialize just fine into the variable.