I am trying to return a pdf as a response to a GET request. For the time being I would like to return a pdf from a file on the classpath. I tried using <to uri="language:constant:resource:classpath:sample.pdf" /> as indicated by [0]. The file is coming through but it's been corrupted. I tried convertBodyTo byte[] but I haven't gotten it to work. Any thoughts? Thank you.
[0] http://stackoverflow.com/a/16811930/1623533 Before: %PDF-1.5 %âãÏÓ After: %PDF-1.5 %����