0

收到错误消息:“org.mule.runtime.api.exception.MuleRuntimeException - 无法从文件存储读取,同时读取payload为 Xml。

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
    xmlns:amqp="http://www.mulesoft.org/schema/mule/amqp"
    xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/amqp http://www.mulesoft.org/schema/mule/amqp/current/mule-amqp.xsd
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
    <amqp:config name="AMQP_Config" doc:name="AMQP Config" doc:id="e0e4ca51-72e7-4d3b-bf01-705aacee16f0" >
        <amqp:connection host="orangutan.rmq.cloudamqp.com" port="5672" virtualHost="xxxx" username="xxxx" password="xxxx" />
    </amqp:config>
    <flow name="artvanFlow" doc:id="59d15f19-3a12-491a-90a0-b2c980dbb05a" >
        <amqp:listener doc:name="Listener" doc:id="ea9cb6d6-ccad-4a7f-8925-5879b561910e" config-ref="AMQP_Config" queueName="PIMQueue" outputMimeType="application/xml"/>
        <ee:transform doc:name="Transform Message" doc:id="cddf8b22-91af-46b4-a8d6-c4237de75307" >
            <ee:message >
                <ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
{
        INVMSTP: {
        IMDEL: payload.Root.STG_SKU.Activity_Code default ""
}
}]]></ee:set-payload>
            </ee:message>
        </ee:transform>
        <logger level="INFO" doc:name="Logger" doc:id="a3411653-aff7-4363-8d24-6c10334d816f" message="#[payload]"/>
    </flow>
</mule>
4

1 回答 1

0

苹果来解决这个问题。骡代码没有问题。输入 XML 有

<?xml version="1.0" **encoding="WINDOWS-1251"** standalone="yes"?>

如果我改为

<?xml version="1.0" **encoding="utf-8"** standalone="yes"?>

事情很好。

于 2019-07-29T04:54:40.887 回答