мой комментарий слишком длинный, чтобы быть размещенным в разделе комментариев, так что лучше размещать здесь.
так выглядит ваша полезная нагрузка.
[<?xml version="1.0" encoding="UTF-8"?>
<reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<reserveCPE_Res_Part>
<t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R">
<T_SUCCESS_FLAG>N</T_SUCCESS_FLAG>
<ORDER_NO/>
<DESCR2000>Not available. (30000,8)</DESCR2000>
<t_reserve_array class="R">
<T_CPE_TYPE>SDSTB</T_CPE_TYPE>
<T_CPE_MODEL/>
<T_CPE_TYPE_QTY>0</T_CPE_TYPE_QTY>
</t_reserve_array>
<t_reserve_array class="R">
<T_CPE_TYPE>SDSTB</T_CPE_TYPE>
<T_CPE_MODEL/>
<T_CPE_TYPE_QTY>0</T_CPE_TYPE_QTY>
</t_reserve_array>
</t_reserve_res>
</reserveCPE_Res_Part>
</reserveCPE_Res>, <?xml version="1.0" encoding="UTF-8"?>
<reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<reserveCPE_Res_Part>
<t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R">
<T_SUCCESS_FLAG>N</T_SUCCESS_FLAG>
<ORDER_NO/>
<DESCR2000>The Business Unit MARIO is not exist. (30000,4)</DESCR2000>
</t_reserve_res>
</reserveCPE_Res_Part>
</reserveCPE_Res>, <?xml version="1.0" encoding="UTF-8"?>
<reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<reserveCPE_Res_Part>
<t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R">
<T_SUCCESS_FLAG>N</T_SUCCESS_FLAG>
<ORDER_NO/>
<DESCR2000>The Business Unit ERNES is not exist. (30000,4)</DESCR2000>
</t_reserve_res>
</reserveCPE_Res_Part>
</reserveCPE_Res>]
после каждой запятой начинается новый xml, поэтому вы не можете встроить несколько xml в один xml, если только вы не пытаетесьиметь несколько строк данных в xml.
первое, что вы хотите сделать, - это преобразовать ваш ввод в правильно сформированный XML, в настоящее время это не так.Посмотрите на все эти , <?xml version="1.0" encoding="UTF-8"?>
в вашей полезной нагрузке, это делает ненужным.
следующий код сделает то, что вы ищете
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd">
<file:connector name="File" outputPattern="*" writeToDirectory="C:\Temp" readFromDirectory="C:\Users\satichen\Desktop\work\test" workDirectory="C:\Users\satichen\Desktop\saruku" autoDelete="false" streaming="true" validateConnections="true" doc:name="File"/>
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/>
<flow name="playgroundFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
<set-payload value="#['[<?xml version="1.0" encoding="UTF-8"?><reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><reserveCPE_Res_Part><t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R"><T_SUCCESS_FLAG>N</T_SUCCESS_FLAG><ORDER_NO/><DESCR2000>Not available. (30000,8)</DESCR2000><t_reserve_array class="R"><T_CPE_TYPE>SDSTB</T_CPE_TYPE><T_CPE_MODEL/><T_CPE_TYPE_QTY>0</T_CPE_TYPE_QTY></t_reserve_array><t_reserve_array class="R"><T_CPE_TYPE>SDSTB</T_CPE_TYPE><T_CPE_MODEL/><T_CPE_TYPE_QTY>0</T_CPE_TYPE_QTY></t_reserve_array></t_reserve_res></reserveCPE_Res_Part></reserveCPE_Res>, <?xml version="1.0" encoding="UTF-8"?><reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><reserveCPE_Res_Part><t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R"><T_SUCCESS_FLAG>N</T_SUCCESS_FLAG><ORDER_NO/><DESCR2000>The Business Unit MARIO is not exist. (30000,4)</DESCR2000></t_reserve_res></reserveCPE_Res_Part></reserveCPE_Res>, <?xml version="1.0" encoding="UTF-8"?><reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><reserveCPE_Res_Part><t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R"><T_SUCCESS_FLAG>N</T_SUCCESS_FLAG><ORDER_NO/><DESCR2000>The Business Unit ERNES is not exist. (30000,4)</DESCR2000></t_reserve_res></reserveCPE_Res_Part></reserveCPE_Res>]']" mimeType="text/plain" doc:name="Set Payload"/>
<expression-component doc:name="remove quotes"><![CDATA[payload=payload.replace('[','');]]></expression-component>
<expression-component doc:name="remote quotes 2"><![CDATA[payload=payload.replace(']','');]]></expression-component>
<expression-component doc:name="Expression"><![CDATA[payload=payload.replace(',','');]]></expression-component>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
и выдаст следующий вывод, но, как указано, вывод xmlпо-прежнему является недопустимым XML-кодом, и вы, возможно, захотите пересмотреть, как на самом деле формируется ваша полезная нагрузка в источнике, и вы, возможно, захотите исправить ее.
<?xml version="1.0" encoding="UTF-8"?>
<reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<reserveCPE_Res_Part>
<t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R">
<T_SUCCESS_FLAG>N</T_SUCCESS_FLAG>
<ORDER_NO/>
<DESCR2000>Not available. (300008)</DESCR2000>
<t_reserve_array class="R">
<T_CPE_TYPE>SDSTB</T_CPE_TYPE>
<T_CPE_MODEL/>
<T_CPE_TYPE_QTY>0</T_CPE_TYPE_QTY>
</t_reserve_array>
<t_reserve_array class="R">
<T_CPE_TYPE>SDSTB</T_CPE_TYPE>
<T_CPE_MODEL/>
<T_CPE_TYPE_QTY>0</T_CPE_TYPE_QTY>
</t_reserve_array>
</t_reserve_res>
</reserveCPE_Res_Part>
</reserveCPE_Res>
<?xml version="1.0" encoding="UTF-8"?>
<reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<reserveCPE_Res_Part>
<t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R">
<T_SUCCESS_FLAG>N</T_SUCCESS_FLAG>
<ORDER_NO/>
<DESCR2000>The Business Unit MARIO is not exist. (300004)</DESCR2000>
</t_reserve_res>
</reserveCPE_Res_Part>
</reserveCPE_Res>
<?xml version="1.0" encoding="UTF-8"?>
<reserveCPE_Res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res.VERSION_1" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<reserveCPE_Res_Part>
<t_reserve_res xmlns="http://xmlns.oracle.com/Enterprise/Tools/schemas/reserveCPE_Res_Part.VERSION_1" class="R">
<T_SUCCESS_FLAG>N</T_SUCCESS_FLAG>
<ORDER_NO/>
<DESCR2000>The Business Unit ERNES is not exist. (300004)</DESCR2000>
</t_reserve_res>
</reserveCPE_Res_Part>
</reserveCPE_Res>