2011-11-24 88 views
1

我根据文档(click here)在mule-config.xml中配置流程。这里是骡子-config.xml中的内容:在Mule中嵌入Restlets无法在Mule中工作3.1.2

<?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端点接收requests.But当我启动骡子情况下,我得到了以下错误:

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

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

+0

截图似乎表明你正在运行Mule 3.1而不是3.2。是对的吗?如果你运行Mule 3.1,你需要为Mule 3.1而不是3.2使用Restlet模块。 –

+0

感谢您解决问题的标题。 –

回答

1

将mulesource.org替换为mulesoft.org 全部您的Restlet名称空间定义。

+0

我用mulesoft.org替换mulesource.ogr,但是错误仍然存​​在 –

+0

您好像运行Mule standalone:您是否在Mule(位于/ usr/lib)中安装了Restlet模块JAR? –

+0

是的,我已经把'mule-transport-restlet-1.3.jar'放入$ MULE_HOME/lib/mule,依赖关系'org.simpleframework-3.1.3.jar','org.restlet-1.1.3.jar' ,'com.noelios.restlet-1.1.3.jar','com.noelios.restlet.ext.simple-1.1.3.jar','com.noelios.restlet.ext.httpclient-1.1.3.jar'到$ MULE_HOME/lib/usr中。但它不起作用 –