Here's what I am looking to do:
a. Create an API Proxy that receives MTOM attachment along with XML data.
b. Convert MTOM attachment to binary data and store it in a variable.
c. Create a new XML message (Assign Message) and insert the binary data from the variable into the new XML.
d. Make a ServiceCallout using the new XML.
e. If successful, pass the original XML message with MTOM attachment as-is to the backend service.
The goal is to virus scan all MTOM attachments before forwarding them to the back end service. The reason that the MTOM attachment needs to be converted to binary data is that the Virus Scan software interface does not accept MTOM attachments. Handles inline binary data only.