在 Mule 中嵌入 Restlet 在 Mule 3.1.2 中无法工作

发布于 2024-12-18 04:09:00 字数 2120 浏览 0 评论 0原文

我根据文档在 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>

此配置使用 HTTP 端点来接收请求。但是当我启动 mule 实例时,出现以下错误:

 在有效内容中发现以元素 'restlet:component' 开头

它表明该文档基于 mule 2.x 。如何更改 Mule-config.xml 中 Mule 3.1.2 的配置?

I configure a flow in mule-config.xml based on the documentation(click here). Here is the content in 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:

 In valid content was found starting with element 'restlet:component'

It seams that the documentation is based on mule 2.x . How do I change the configuration in mule-config.xml for Mule 3.1.2 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

归属感 2024-12-25 04:09:00

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

Replace mulesource.org with mulesoft.org in all your Restlet namespace definitions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文