2011-11-24 34 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中。但它不起作用 –

相關問題