简体   繁体   English

在Mule 3.1.2中无法将Restlets嵌入Mule中

[英]Embedding Restlets in Mule can't work in Mule 3.1.2

I configure a flow in mule-config.xml based on the documentation( click here ). 我根据文档在mule-config.xml中配置流( 单击此处 )。 Here is the content in mule-config.xml: 这是mule-config.xml中的内容:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:spring="http://www.springframework.org/schema/beans"
      xmlns:tcp="http://www.mulesoft.org/schema/mule/tcp"
      xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
      xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
      xmlns:http="http://www.mulesoft.org/schema/mule/http"
      xmlns:restlet="http://www.mulesource.org/schema/mule/restlet"
      xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd
    http://www.mulesoft.org/schema/mule/tcp http://www.mulesoft.org/schema/mule/tcp/3.1/mule-tcp.xsd
    http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.1/mule-vm.xsd
    http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.1/mule-cxf.xsd
    http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.1/mule-http.xsd
    http://www.mulesoft.org/schema/mule/restlet http://www.mulesoft.org/schema/mule/restlet/3.1/mule-restlet.xsd">

    <description>
        This configuration uses an HTTP endpoint to receive requests.
    </description>

    <flow name="fuxk">
        <inbound-endpoint   address="http://localhost:9002">
        </inbound-endpoint>
        <restlet:component restlet-ref="helloWorld"/>

    </flow>
    <spring:bean id="helloWorld" class="com.ggd543.mulerestletdemo.HelloWorldApplication"/>

</mule>

This configuration uses an HTTP endpoint to receive requests.But when I start up the mule instance , I got the following error: 此配置使用HTTP端点接收请求。但是,当我启动mule实例时,出现以下错误:

在有效的内容中发现了以元素“ restlet:component”开头

It seams that the documentation is based on mule 2.x . 似乎该文档基于mule2.x。 How do I change the configuration in mule-config.xml for Mule 3.1.2 ? 如何更改Mule 3.1.2的mule-config.xml中的配置?

所有 Restlet名称空间定义中,将mulesource.org替换为mulesoft.org。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM