MTOM data conversion - base64Binary

I have a SOAP 1.2 web service receiving a base64Binary string to append records to a file. I understand this is the best way to receive the data (MTOM). The application calling the web service is able to pass a byte array into the string variable with no issues. During the receive process the base64String is used in pub.file:stringToFile.

What is the best practice to convert the data back to string data ? I have tried base64Encode and base64DEcode with no luck.

base64DEcode service should be enough for that.
What’s the issue you have with calling it?

I have this sorted now. My first attempt was to use write the Content String into the file via pub.file.stringToFile. I ended up using base64Decode to create bytes from the inbound string then bytesToFile to append the records.

Of course when retrieving the data I am just using bytesToString.