2012-02-23 36 views
0

將WSO2用作企業服務總線我能夠爲我的Web服務(WCF)建立代理服務。爲了減少我的Web服務的負載,我打算在WSO2中使用消息存儲並使用轉發處理器,以便我可以以它可以採用的速度提供我的Web服務。我提到 article,,它談論的是進出服務,其中響應僅記錄在文件中。是否有可能使用此模式將響應返回給客戶端,而不僅僅是將其記錄在文件中?WSO2 - 使用消息存儲庫調用同步Web服務併發迴響應

我不確定這是否可能,如果有人可以提供關於如何設置我的代理服務的任何意見,我將不勝感激。

回答

0

您可以修改通過添加<send/>調解員取出<drop/>這樣的文章中提到的replySequence ..

<sequence xmlns="http://ws.apache.org/ns/synapse" name="replySequence"> 
     <log level="full"> 
      <property name="REPLY" value="MESSAGE"> 
     </property></log> 
     <!-- Send the messages where they are destined to (i.e. the 'To' EPR of the message) --> 
     <send/> 
    </sequence> 

..或者你可以定義端點明確發送答覆這樣的..

<sequence xmlns="http://ws.apache.org/ns/synapse" name="replySequence"> 
    <log level="full"> 
     <property name="REPLY" value="MESSAGE"> 
    </property></log> 
    <!-- Send to an explicit address --> 
    <send> 
    <endpoint> 
     <address uri="http://{Add your address here}/"/> 
    </endpoint> 
    </send> 
</sequence> 
+0

我認爲如果我想將它發送給其他服務,但我希望將響應發回給調用者(提交請求的人),則您的建議可行。無論如何,我能做到嗎? – Premkumar 2012-02-24 10:11:00