此处不允许使用元素集有效负载

时间:2016-01-07 15:00:52

标签: mule

我在功能测试用例中使用了一个简单的配置文件,在Anypoint Studio中工作正常但在IntelliJ(我的主IDE)中使用时,set-payload为红色且悬停测试显示

  

“此处不允许元素集有效负载”

运行测试时,我得到以下异常

  

org.mule.api.config.ConfigurationException:XML文档中的第17行   来自URL   [文件:/ C:/dev/Messaging/Revenue-mule3-sms/target/test-classes/mule-conf2.xml]   是无效的;嵌套异常是org.xml.sax.SAXParseException;   lineNumber:17; columnNumber:60; cvc-complex-type.2.4.a:无效   找到以元素'set-payload'开头的内容

我在文件

中配置了以下命名空间
 xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core"
        xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
        xmlns:test="http://www.mulesoft.org/schema/mule/test"
        version="EE-3.2.2"
        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/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/test http://www.mulesoft.org/schema/mule/test/current/mule-test.xsd">

并添加了大多数主要依赖项。这可能是什么问题?

编辑

Xml文件内容

<flow name="simplejunittestFlow1" doc:name="simplejunittestFlow1">
        <inbound-endpoint address="vm://test" exchange-pattern="request-response" doc:name="Generic"/>
        <set-payload value="#['Pass']" doc:name="Set Payload"/>
        <flow-ref name="simplejunittestFlow2" doc:name="Flow Reference"/>
    </flow>
    <sub-flow name="simplejunittestFlow2" doc:name="simplejunittestFlow2">
        <set-payload value="#['Pass']" doc:name="Set Payload"/>
        <set-payload  doc:name="Set Payload"/>
    </sub-flow>

1 个答案:

答案 0 :(得分:0)

直到3.3.0才引入

Traceback (most recent call last): File "...path.../Server.py", line 32, in <module> data = s.recv(BUFFER_SIZE).split(" ") socket.error: [Errno 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied The line number is different because I removed some imports 变压器。我看到你正在使用:version =&#34; EE-3.2.2&#34;

{{3}}