WSO2 ESB代理基本服务链

时间:2015-02-26 07:38:03

标签: wso2 wso2esb

我认为这是一个相当简单的服务链方案。

我只想将一些数据转发给代理服务,然后代理服务将遍历数据并使用该数据的ID(" entity_id")(它可以成功检索)查找位于WSO2数据服务服务器中的资源。一旦它有了该请求的结果,我想将它转发给另一个应用程序(在这种情况下是RequestBin)。

请查看下面的代理配置:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="pollService"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <log level="full"/>   
         <iterate id="iter1"
                  expression="//*[local-name()='Change']"
                  sequential="true">
            <target sequence="anon">
               <sequence>
                  <log level="full"/>
                  <property name="uri.var.entityid" expression="//*[local-name()='entity_id']"/>
                  <call>
                     <endpoint>
                        <http method="get"
                              uri-template="http://54.66.155.36:9764/services/civicrm/activity/{uri.var.entityid}"/>
                     </endpoint>
                  </call>
                  <log level="full"/>
                  <call>
                     <endpoint>
                        <http method="post" uri-template="http://requestb.in/1c79v711"/>
                     </endpoint>
                  </call>
                  <log level="full"/>
               </sequence>
            </target>
         </iterate>
      </inSequence>
   </target>
   <description/>
</proxy>

我目前没有任何迹象表明这两个电话根本就被解雇了。

非常感谢任何协助。

谢谢。

2 个答案:

答案 0 :(得分:0)

您可以启用wirelog并验证是否已触发呼叫。 请参阅以下博客文章,了解有关wirelog的信息。

1 http://mytecheye.blogspot.in/2013/09/wso2-esb-all-about-wire-logs.html

答案 1 :(得分:0)

您是否也可以提供示例消息(进入代理的内容),并查看代理中发生的更详细的细节,进入[esb-home] / repository / conf /并打开log4j.properties文件,并设置 log4j.category.org.apache.synapse = DEBUG,也像@robin一样建议。试试

 <log level="full" category="DEBUG" separator="-----:-----"/>

在您的代理中,您希望在此处查看消息的状态。

相关问题