From time-to-time, OSB will pass content via reference. For example the following.
Resolution:
Use the java callout method org.apache.commons.codec.binary.StringUtils.newStringUsAscii() from commons-codec-1.7.jar to convert reference into string.
Got-cha:
Be sure to place the star in to fetch the byte[] content in $attachments/ctx:attachment/ctx:body/*
Enjoy.