2012-08-09 137 views
0

我試圖實現與WSO2 ESB一個簡單的消息流,但不是很熟悉這個話題:與服務提供商要回一個隨機整數WSO2 ESB中介流

「消費者客戶端通信。 「理想情況下,我想將隨機數發送回客戶端,但也發送給其他服務。

  • 我首先定義了一個自定義代理(http,https協議);
  • a InSequence:LOG mediator,Send Mediator;
  • 稱爲 「RandomNumbers」 實際服務的端點(HTTP://本地主機:8280 /服務/ RandomNumbers)
  • 的OutSequence:LOG調解員,調解員發送
  • 故障序列:現有故障

有人可以檢查這個實現是否正確?非常感謝

<proxy name="ClientAskNumber" transports="https http" startOnLoad="true" trace="disable"> 
     <target faultSequence="fault"> 
      <endpoint> 
       <address uri="http://localhost:8280/services/RandomNumbers"/> 
      </endpoint> 
      <inSequence> 
       <log/> 
       <send/> 
      </inSequence> 
      <outSequence> 
       <log/> 
       <send/> 
      </outSequence> 
     </target> 
    </proxy> 

回答

3

更正了configuartion ..

<proxy name="ClientAskNumber" transports="https http" startOnLoad="true" 
     trace="disable"> 
     <target faultSequence="fault"> 
      <inSequence> 
       <log level="full"> 
        <property name="Insequence" value="***" /> 
       </log> 
       <send> 
        <endpoint> 
         <address uri="http://localhost:8280/services/RandomNumbers" /> 
        </endpoint> 
       </send> 
      </inSequence> 
      <outSequence> 
       <log level="full"> 
        <property name="Outsequence" value="***" /> 
       </log> 
       <send /> 
      </outSequence> 
     </target> 
    </proxy> 
+0

好了,但我如何調用該方法 「GetNumber」 收到我的消息多少?謝謝 – nuvio 2012-08-10 12:37:10

+0

你好,我有一個「未找到操作的端點引用(EPR)是/ services/DotNetRandoms和WSA Action = urn:mediate。如果此EPR先前可到達,請聯繫服務器管理員。這是什麼意思?謝謝 – nuvio 2012-08-10 13:53:48

+0

您的服務已啓動並正在運行? taht是你應該能夠查看wsdl @這個位置。 http:// localhost:8280/services/RandomNumbers?wsdl並且在您的服務中,您還必須定義該操作。 – Ratha 2012-08-10 15:23:06