It seems that the purpose of getBody(Class<T> type) is to convert the message body to the requested type. When this is used on a getUnitOfWork().getOriginalInMessage() message though the conversion doesn't happen. Debugging indicates this is because the message's exchange variable is null.
For example requesting a string type when using a File queue fails as a conversion from GenericFile to String is required.
It seems like the exchange should be set/copied when the originalInMessage is created (in the DefaultUnitOfWork constructor) so this functionality can work.
Reference to mailing list dicussion: http://mail-archives.apache.org/mod_mbox/camel-dev/201702.mbox/ajax/%3Ce8b612e0-60ab-1a51-b024-87b48e024c51%40me.uk.eu.org%3E