2013-03-22 31 views
1

我已經用camel路徑定義了駱駝上下文,並且我有下面的代碼。無法從駱駝路由獲取輸出

from("jetty:http://localhost:9090/camelcxfdemo/rest/cxf/camelRouter?matchOnUriPrefix=true"). 
    to("jetty:http://localhost:9090/camelcxfdemo/rest/cxf/getPersonData?bridgeEndpoint=true&throwExceptionOnFailure=false") 
    .to("jetty:http://localhost:9090/camelcxfdemo/rest/cxf/processPersonData?bridgeEndpoint=true&throwExceptionOnFailure=false") 
    .to("log:output"); 

所有上述三個URL是REST服務這需要一些後XML並返回XML響應。

我希望我的駱駝路由器在調用/ camelRouter時開始工作,它的輸出應該轉到/ getPersonData url並且/ getPersonData的輸出轉到/ processPersonData。對於用戶,我最終應該顯示/ processPersonData的輸出。

因此,每個網址都依賴於它之前的網址輸出。

但問題是當我調用/ camelRouter url時,我總是得到/ camelRouter響應,而不是最終輸出。輸出不是從一個服務路由到另一個服務。

那麼在我的代碼中有任何probelm?希望得到一些幫助。

感謝

回答

1

在我看來,該碼頭組件可用於無論是作爲生產者或消費者但不能同時爲你似乎在嘗試使用它。