Loading

Data Encoding Error 'Invalid UTF-8 middle byte' After Reading File From FTP Directory With MuleSoft SOAP Connector

게시 일자: Jan 9, 2026
상세 설명

You have a Flow that reads a file from an FTP directory. When you map it into another structure to be delivered using the MuleSoft SOAP connector, an error like below is thrown:

"\"org.mule.weave.v2.module.reader.ReaderParsingException: Invalid UTF-8 middle byte 0x20 (at char #317, byte #127)\nTrace:\n at main (Unknown), while reading `payload` as Xml.\nTrace:\n at main (Unknown)\n\" evaluating expression: \"%dw 2.0\noutput application/json skipNullOn = \"everywhere\"\nns ns0 [......] "."
솔루션

The cause of the MuleSoft Flow error "Invalid UTF-8 middle byte", is that the mapping cannot parse the input message due to some unexpected characters being received in the file being read from the FTP directory.

SOLUTION

In the File Read Flow, set the MIME Type to application/xml and Encoding parameter to ISO-8859-1  as shown in the screenshot example below:
screenshot

Knowledge 기사 번호

001121702

 
로드 중
Salesforce Help | Article