cvc-complex-type.2.4.a:从元素' dw:transform-message'开始发现无效内容。

时间:2016-01-13 07:22:17

标签: maven mule

我正在尝试在mule standalone 3.7.0 EE上部署一个mule app,但是 运行时我发生此错误:cvc-complex-type.2.4.a: Invalid content was found starting with element 'dw:transform-message'

这是我的流程:

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

 <mule xmlns:magento="http://www.mulesoft.org/schema/mule/magento" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:json="http://www.mulesoft.org/schema/mule/json" 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/core http://www.mulesoft.org/schema/mule/core/current/mule.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/magento http://www.mulesoft.org/schema/mule/magento/current/mule-magento.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<magento:config name="Magento" username="test" password="test" address="http://127.0.0.1:8000/api/v2_soap/" doc:name="Magento"/>
<flow name="proFlow">
    <http:listener config-ref="HTTP_Listener_Configuration" path="test" doc:name="HTTP"/>
    <magento:get-order config-ref="Magento" orderId="100000000" doc:name="Magento"/>
    <dw:transform-message doc:name="Transform Message">
        <dw:set-payload><![CDATA[%dw 1.0
         %output application/json
         ---
        {
        orderId: payload.increment_id
        }]]></dw:set-payload>
       </dw:transform-message>
    <set-payload value="#[payload]" doc:name="Set Payload"/>
</flow>
</mule>

另外,我在pom.xml中有这种依赖:

      <dependency>
        <groupId>com.mulesoft.weave</groupId>
        <artifactId>mule-plugin-weave_2.11</artifactId>
        <version>${mule.version}</version>
        <scope>provided</scope>
    </dependency>

1 个答案:

答案 0 :(得分:3)

您似乎缺少此架构位置:

http://www.mulesoft.org/schema/mule/ee/dw
http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd

尝试将其添加到xsi:schemaLocation列表中。

希望这会有所帮助 此致

相关问题