2012-08-09 133 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